<?php if(Auth::user()->hasAnyPermission(['All','Approve Voucher','Reject Voucher','Reverse Voucher'])): ?>

<div class="modal fade" id="md_approve_voucher" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <?php echo e(Form::open(array('route' => 'voucher.status', 'class' => 'cls_form'))); ?>

  <div class="modal-dialog modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <?php if(EF::getUrl() == 'voucher'): ?>
        <h5 class="modal-title" id="exampleModalLabel">Approve/Reject Voucher</h5>
        <?php else: ?>
          <h5 class="modal-title" id="exampleModalLabel">Reverse Voucher</h5> 
        <?php endif; ?>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true"></span>
        </button>
      </div>
      <div class="modal-body">
        <div class="row">

          
            <div class="col-sm-12">
              <div class="card">
            

                  <div class="card-status card-status-left bg-blue"></div>
                   <div class="table-responsive" id="journal_view">
                 
                </div>

                </div>
            </div>
             <div class="col-sm-12">
                            <label class="label-color">Select Option: <i style = "color:red;">*</i></label>
                                 <br>
                    <label class="label-color"> <i style = "color:red;">On rejecting voucher all your associated payments will be removed from the system</i></label>
                            
                            <small class="form-errors pull-right req" value="*"><?php echo e($errors->first('status',":message")); ?></small>

                            <div class="input-group mb-3 " id="booking_detail_<?php echo e($voucher_id); ?>">
                             
                              <select id="status" name="status" class="form-control form-control-sm cls_selection">
                              
                              <?php $__currentLoopData = EF::getVoucherStatus(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $rows): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>  

                              <?php if($rows == "Reverse" && EF::getUrl() == 'subheadviewledger'): ?>
                                <option value = <?php echo e($rows); ?> ><?php echo e($rows); ?> </option>
                              <?php elseif(EF::getUrl() == 'voucher' && $rows != "Reverse"): ?>
                                <option value = <?php echo e($rows); ?> ><?php echo e($rows); ?> </option>

                              <?php endif; ?>
                               <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> 
                              

                              </select>
                     
                            </div>
                        </div>

            <div class="col-sm-12 col-md-12 col-lg-12">
            <label class="label-color">Clearance Date: <i style = "color:red;">*</i></label>
       
                            
                            <small class="form-errors pull-right req" value="*"><?php echo e($errors->first('date',":message")); ?></small>
            <div class="input-group mb-3">
           
              <?php echo e(Form::Date('date', '', ['class' => 'form-control form-control-sm cls_date ', 'placeholder' => 'Date' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default'])); ?>

            </div>
          </div>

  
        <input type="hidden" name="transaction_id" id="transaction_id" >
        <input type="hidden" name="journal_id" id="journal_id"  >
      

   
      
    </div>
     </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <button type="submit" class="btn btn-primary cls_submit" <?php if(EF::getUrl() == 'voucher'): ?> content="approve/reject voucher" <?php else: ?> content = "reverse voucher" <?php endif; ?>>Submit</button>
      </div>
   
  </div>
  <?php echo e(Form::close()); ?>

</div>
</div>

<?php endif; ?><?php /**PATH /home/ubuntu/rebmgisplus/skylite/resources/views/voucher/modals/approve_voucher.blade.php ENDPATH**/ ?>