<?php $__env->startSection('page_title'); ?>
  Cancel Booking
<?php $__env->stopSection(); ?>

<?php $__env->startSection('page_header_title'); ?>
 Approve Cancel Booking
<?php $__env->stopSection(); ?>
<?php $__env->startSection('page_body'); ?>
<?php echo e(Breadcrumbs::render('transfer_booking',Crypt::encrypt($booking->id),($booking->plot->plot_id.' '.$booking->plot->block_name.' '.$booking->plot->category))); ?>

<?php ($label_list = EF::getCancelFormWhiteLabel()); ?>
<div class="row">
   <?php echo $__env->make('booking.sections.booking_information', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

                   <div class = "col-md-8 col-sm-12">
        <div class= "card ">
                        <div class="card-status bg-teal">
                      </div>
                               <div class="card-header"> 

               <h3 class="card-title">Approve Cancel Booking</h3>

               </div>

               <div class="alert alert-primary card-alert mb-0">
                Please fill in the below details for approval of Cancel Booking
               </div>
               <br>
                <?php echo e(Form::open(array( 'route' => 'booking.cancel_approve', 'class' => 'cls_from'))); ?>

               <div class="row cls-tranfer-div">
                            <div class="col-sm-4">
                               <label class="label-color" >Reg #</label>
            <small class="form-errors pull-right req" value=""><?php echo e($errors->first('reg_number',":message")); ?></small>

            <div class="input-group mb-3">
            
              <?php echo e(Form::Text('reg_number', $cancel_details->ms, ['class' => 'form-control form-control-sm cls_required', 'placeholder' => 'Reg # ' , 'aria-label' => 'Default','readonly' => 'true' , 'aria-describedby' => 'inputGroup-sizing-default'])); ?>

            </div>    
          </div>
             
                <div class="col-sm-4">
                   <label class="label-color" >File #</label>
            <small class="form-errors pull-right req" value=""><?php echo e($errors->first('file',":message")); ?></small>

            <div class="input-group mb-3">
             
              <?php echo e(Form::Text('file', $booking->file_number , ['class' => 'form-control form-control-sm cls_required', 'placeholder' => 'File # ' , 'aria-label' => 'Default' ,'readonly' => 'true', 'aria-describedby' => 'inputGroup-sizing-default'])); ?>

            </div>    
          </div>
          
        <div class="col-sm-4">
                            <label class="label-color">Cancel Date: <i style = "color:red;">*</i></label>
            <small class="form-errors pull-right req" value="*"><?php echo e($errors->first('cancel_date',":message")); ?></small>

            <div class="input-group mb-3">
           
              <?php echo e(Form::Date('cancel_date', date('Y-m-d',strtotime($cancel_details->created_at)), ['class' => 'form-control form-control-sm  form-control form-control-sm -sm  cls_date', 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default'])); ?>

            </div>

          </div>

          <div class="col-sm-6">
             <label class="label-color" >Agreed Amount:</label>
            <small class="form-errors pull-right req" value="*"><?php echo e($errors->first('agreed_amount',":message")); ?></small>

            <div class="input-group mb-3">
          
              <?php echo e(Form::Text('agreed_amount',EF::numberFormat($booking->agreed_amount), ['class' => 'form-control form-control-sm', 'aria-label' => 'Default','readonly' => 'true', 'aria-describedby' => 'inputGroup-sizing-default'])); ?>

            </div>    
          </div>

           <div class="col-sm-6">
             <label class="label-color" >Received Amount:</label>
            <small class="form-errors pull-right" value=""><?php echo e($errors->first('received_amount',":message")); ?></small>

            <div class="input-group mb-3">
           
              <?php echo e(Form::Text('received_amount', EF::numberFormat($balance_detail['debit']), ['class' => 'form-control form-control-sm received ', 'aria-label' => 'Default','readonly' => 'true', 'aria-describedby' => 'inputGroup-sizing-default','placeholder'=>'Deduction Amount'])); ?>

            </div>    
          </div>

          <?php if($balance_detail['debit'] > 0): ?>
         
             <div class="col-sm-6">
               <label class="label-color" ><?php echo e(ucwords(str_replace('_',' ',$label_list['deduction_amount']))); ?>:</label>
            <small class="form-errors pull-right req" value=""><?php echo e($errors->first($label_list['deduction_amount'],":message")); ?></small>
            <div class="input-group mb-3">

              <input type ="text" class ="form-control form-control-sm" name = "<?php echo e($label_list['deduction_amount']); ?>" value = "<?php echo e($cancel_details->deduction_amount); ?>" placeholder = "Deduction Amount" onkeyup="calculateRefund(event,this,'<?php echo e($balance_detail['debit']); ?>')"  />
            
            </div>
               
          </div>

      <div class="col-sm-6">
                 <label class="label-color" >In Words:</label>
            <div class="input-group mb-3">
            
              <?php echo e(Form::Text('deduction_in_words',EF::numberToWords($cancel_details->deduction_amount), ['class' => 'form-control form-control-sm deduction', 'placeholder' => 'Deduction In Words' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default' ,'readonly' => 'true'])); ?>

            </div> 
          </div> 
             <div class="col-sm-6">
               <label class="label-color" ><?php echo e(ucwords(str_replace('_',' ',$label_list['refund_amount']))); ?>:</label>
                <small class="form-errors pull-right req " value=""><?php echo e($errors->first($label_list['refund_amount'],":message")); ?></small>
            <div class="input-group mb-3">
          
              <?php echo e(Form::Text($label_list['refund_amount'], $cancel_details->refund_amount, ['class' => 'form-control form-control-sm cls_decimal_digit refund', 'placeholder' => 'Refund In Words' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default','readonly'=>'true'])); ?>

            </div> 
          </div> 
               <div class="col-sm-6">
                 <label class="label-color" >In Words:</label>
            <div class="input-group mb-3">
            
              <?php echo e(Form::Text('refund_in_words', EF::numberToWords($cancel_details->refund_amount), ['class' => 'form-control form-control-sm refund_in_words', 'placeholder' => 'Refund In Words' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default' ,'readonly' => 'true'])); ?>

            </div> 
          </div> 
          <?php else: ?>
            <div class="col-sm-6">
          <input type="hidden" name="<?php echo e($label_list['deduction_amount']); ?>" value="0">
        </div>
          <?php endif; ?>

           
                 <br>
                     <?php if(Auth::user()->hasAnyPermission(['All','Approve Cancel Booking'])): ?>  
       
          
            <div class = "col-sm-12">
                  <div class="form-check form-check-inline">
            <input class="form-check-input" type="checkbox" <?php if($cancel_details->ceo_approval == TRUE): ?> checked <?php endif; ?> name="inlineapproval" >
            <label class="form-check-label">CEO Approval</label>
            </div>

            <div class="form-check form-check-inline">

            <input class="form-check-input" type="checkbox"  <?php if($cancel_details->original_receipts == TRUE): ?> checked <?php endif; ?> name ="inlinereceipts">
            <label class="form-check-label">Original Receipts Received</label>
            </div>

            <div class="form-check form-check-inline">
            <input class="form-check-input" type="checkbox" <?php if($cancel_details->original_app_receipts == TRUE): ?> checked <?php endif; ?>  name="inlineapplication" >
            <label class="form-check-label">Original Application Received</label>
            </div>

            <div class="form-check form-check-inline">
            <input class="form-check-input" type="checkbox"  <?php if($cancel_details->original_file_receipts == TRUE): ?> checked <?php endif; ?>  name="inlinefile">
            <label class="form-check-label">Original File Received</label>
            </div>
              <div class="form-check form-check-inline">
            <input class="form-check-input" type="checkbox"  <?php if($cancel_details->original_agreement_receipts == TRUE): ?> checked <?php endif; ?>  name="inlineagreement">
            <label class="form-check-label">Original Agreement Received</label>
            </div>
              </div>
           
                    <div class="col-sm-12">
               <label class="label-color" >Missing Documents:</label>
                <small class="form-errors pull-right req " value=""><?php echo e($errors->first('missing_documents',":message")); ?></small>
            <div class="input-group mb-3">
          
              <?php echo e(Form::Textarea('missing_documents', $cancel_details->missing_documents, ['class' => 'form-control form-control-sm  ', 'placeholder' => 'Missing Documents' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default','rows'=>2])); ?>

            </div> 
          </div> 
          <?php endif; ?>
        
             <div class="col-sm-12 modal-footer card-options">
 
        <button type="submit" class="btn btn-primary cls_submit pull-right" content="Submit">Submit</button>
                    <input type="hidden" name="bookinguser_id" value="<?php echo e(Crypt::encrypt($booking->user->id)); ?>" >  
                   <input type="hidden" name="booking_id" value="<?php echo e(Crypt::encrypt($booking->id)); ?>" >    
              
                <?php echo e(Form::close()); ?>

                                  
                    </div>
                    </div>                   
</div>
</div>
</div>
<?php $__env->stopSection(); ?>


<?php $__env->startSection('page_modal'); ?>

<?php $__env->stopSection(); ?>

<?php $__env->startSection('page_script'); ?>
<?php echo $__env->make('scripts.booking', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>  
<?php echo $__env->make('scripts.validation', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> 

<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.dashboard', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/ubuntu/rebmgisplus/skylite/resources/views/booking/approve_cancel_booking.blade.php ENDPATH**/ ?>