<?php $__env->startSection('content'); ?>
    <div class="card card-outline-info">
        <div class="card-header">
            <h4 class="m-b-0 text-white">Print Receipt</h4>
        </div>
    <div class="row">
    <div class="card-body">
      <h3 class="card-title">Payments Approved</h3>
        <div class="x_content">
          <table id="datatable-fixed-header" class="table table-striped table-bordered">
            <thead>
              <tr>
                <th>Amount</th>
                <th>Plot:Block:Sector:Project</th>
                <th>Remark</th>
                <th>Status</th>
                <th>Created at</th>
                <th>Paid at</th>
                <th>Action</th>
              </tr>
            </thead>


            <tbody>
            <?php $__currentLoopData = $payments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $payment): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
              <tr>
                <td><?php echo e(IND_money_format($payment->amount)); ?></td>
                <td><?php echo e($payment->name); ?></td>
                <td><?php echo str_replace('/////////////', '<br />', $payment->comment); ?></td>
                <td><?php echo e(($payment->status==1)?'Approved':'Pending'); ?></td>
                <td><?php echo e($payment->created_at); ?></td>
                <td><?php echo e($payment->paid_on); ?></td>
                <td>
                    <a href="<?php echo e(url('/payments/printreceipts/').'/'.$payment->id); ?>" id="print" class="btn btn-default btn-outline" type="button"> 
                        <span><i class="fa fa-print"></i> Print</span> 
                    </a>
                </td>
              </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </tbody>
          </table>
        </div>
      </div>
    </div>
</div>
<!-- The Modal -->
<div class="modal fade" id="loadModalAjax" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" style="display: none;" aria-hidden="true">
  <div class="modal-dialog modal-lg" role="document">
    <div class="modal-content">

      <!-- Modal Header -->
      <div class="modal-header">
        <h4 class="modal-title">Payment Cancellation</h4>
        <button type="button" class="close" data-dismiss="modal">&times;</button>
      </div>

      <!-- Modal body -->
      <div class="modal-body">
        <?php echo Form::open(['method' => 'POST','id'=> 'cancel_payment', 'data-parsley-validate'=>'', 'url' => ['']]); ?>

        <div class="row">
          <div class="col-md-12">
              <div class="form-group">
                  <label class="control-label" for="payment_reference">Remark</label>
                  <textarea type="text" id="cancel_comment" name="comment" required="required" class="form-control" value=""></textarea>
              </div>
          </div>
        </div>
        <?php echo Form::submit('Submit', ['class' => 'btn btn-danger']); ?>

        <?php echo Form::close(); ?>

      </div>

      <!-- Modal footer -->
      <div class="modal-footer">
        <button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
      </div>

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

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

<?php $__env->startSection('javascript'); ?>
    <!-- Date picker plugins css -->
    <link href="<?php echo e(url('assets')); ?>/plugins/bootstrap-datepicker/bootstrap-datepicker.min.css" rel="stylesheet" type="text/css" />
    <!-- Daterange picker plugins css -->
    <link href="<?php echo e(url('assets')); ?>/plugins/timepicker/bootstrap-timepicker.min.css" rel="stylesheet">
    <link href="<?php echo e(url('assets')); ?>/plugins/bootstrap-daterangepicker/daterangepicker.css" rel="stylesheet">
    <!-- Date Picker Plugin JavaScript -->
    <script src="<?php echo e(url('assets')); ?>/plugins/bootstrap-datepicker/bootstrap-datepicker.min.js"></script>
    <!-- Date range Plugin JavaScript -->
    <script src="<?php echo e(url('assets')); ?>/plugins/timepicker/bootstrap-timepicker.min.js"></script>
    <script src="<?php echo e(url('assets')); ?>/plugins/bootstrap-daterangepicker/daterangepicker.js"></script>
    <script src="<?php echo e(url('assets')); ?>/js/jqBootstrapValidation.js"></script>
    <link href="<?php echo e(url('assets')); ?>/plugins/EasyAutocomplete/easy-autocomplete.min.css" rel="stylesheet">
    <script src="<?php echo e(url('assets')); ?>/plugins/EasyAutocomplete/jquery.easy-autocomplete.min.js"></script>
    <script src="<?php echo e(url('assets')); ?>/js/typeahead.bundle.js"></script>
    <script src="<?php echo e(url('assets')); ?>/js/jquery.PrintArea.js" type="text/JavaScript"></script>    
    <!-- Parsley -->
    <script>
     jQuery(document).ready(function() {
        jQuery('.mydatepicker, #datepicker').datepicker({format: 'yyyy-mm-dd'});
        jQuery('#datatable-fixed-header').DataTable({
          fixedHeader: true
        });
        $('button.cancel_payment').click(function(){
          $('form#cancel_payment').attr('action', $(this).attr('data-url'));
          $('#loadModalAjax').modal({show:true});
        });
        $("#print").click(function() {
            var mode = 'iframe'; //popup
            var close = mode == "popup";
            var options = {
                mode: mode,
                popClose: close
            };
            $("div.printableArea").printArea(options);
        });
      });
  </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH G:\xampp\htdocs\yeselectricv.loc\resources\views/payments/printReciepts.blade.php ENDPATH**/ ?>