<?php echo $__env->make('dashboard.include.header', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

  
  <div class="content-wrapper">
    <div class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h1 class="m-0">Courier Payment Summary</h1>
          </div>
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item"><a href="/home">Home</a></li>
              <li class="breadcrumb-item active">Courier Payment Summary</li>
            </ol>
          </div>
        </div>
      </div>
    </div>
   
    <section class="content">
      <div class="container-fluid">

      <div class="card">
        <div class="card-body">
        <form class="form-horizontal" method="POST" action="/courierpaymentsummaryfilter">
          <?php echo e(csrf_field()); ?>

          <div class="row">
            <div class="col-md-3">
                  <div class="form-group">
                      <label>Select Delivery Service</label>
                      <select class="form-control" name="delivery" id="delivery" style="width: 100%;" required>
                          <option value="" selected="selected" disabled>Select</option>
                              <?php $__currentLoopData = $delise; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                              <option value="<?php echo e($data->id); ?>" <?php if($del==$data->id): ?> selected <?php else: ?> <?php endif; ?>><?php echo e($data->deliveryname); ?></option>
                              <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                      </select>
                  </div>
              </div>

              <div class="col-md-1" style="padding-top:30px;">
                <button type="submit" class="btn btn-primary btn-block">Filter</button>
            </div>


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




      <div class="card">
        <div class="card-body">
          <div class="row">
            <div class="col-md-12">
                <table id="example12" data-page-length='50' class="table table-bordered" style="width:100%; font-size:11px;">
                <thead>
                            <tr>
                                <th>Delivery Company</th>
                                <th>Bank</th>
                                <th>COD Amount</th>
                                <th>Delivery Charge</th>
                                <th>Payable Amount</th>
                                <th>Payment ID</th>
                                <th>Paid Date</th>
                                <th>Status</th>
                                <th>Action</th>

                            </tr>
                        </thead>
                        <tbody>
                        <?php if($del == "null"): ?>
                        <?php else: ?>
                        <?php $__currentLoopData = $cuso; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $coudata): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                            <td><?php echo e($coudata->deliveryrecivemoneyget->deliveryname); ?></td>
                            <td><?php echo e($coudata->bankname->bank); ?></td>
                            <td><?php echo e($coudata->codamount); ?></td>
                            <td><?php echo e($coudata->deliverycharge); ?></td>
                            <td><?php echo e($coudata->payablecod); ?></td>
                            <td><?php echo e($coudata->courierpaymentid); ?></td>
                            <td><?php echo e($coudata->paidat); ?></td>
                            <td class="text-center">
                                <?php if($coudata->status=='0'): ?>
                                <span class="badge badge-warning">Not Paid</span>
                                <?php elseif($coudata->status=='1'): ?>
                                <span class="badge badge-success">Paid</span>
                                <?php endif; ?>
                                </td>
                                <td class="text-center">               
                                    <a data-id="<?php echo e($coudata->id); ?>" class="btn btn-primary btn-xs" href="receivedetails/<?php echo e($coudata->id); ?>">View</a>                                                                                                                                                                 
                                </td>  
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        <?php endif; ?>
                        </tbody>
                    </table>
            </div>
          </div>
          </div>
        </div>

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



  <?php echo $__env->make('dashboard.include.footer', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>;

<script>
$(document).ready(function() {
    $('#example12').DataTable({
        "responsive": true, "lengthChange": true, "autoWidth": false,"order": [[ 0, "asc" ]],
      // "buttons": ["copy", "csv", "excel", "pdf", "print"]
      "buttons": [ {extend: 'copy',footer: true,exportOptions: {columns: [0,1,2,3,4,5,6,7]}},   
      {extend: 'csv',footer: true,exportOptions: {columns: [0,1,2,3,4,5,6,7]}},
      {extend: 'excel',footer: true,exportOptions: {columns: [0,1,2,3,4,5,6,7]}},
      {extend: 'pdf',footer: true,exportOptions: {columns: [0,1,2,3,4,5,6,7]}},
      {extend: 'print',footer: true,exportOptions: {columns: [0,1,2,3,4,5,6,7]}},      
    ]  
    }).buttons().container().appendTo('#example12_wrapper .col-md-6:eq(0)');
} );


    $('#reservation').daterangepicker({
        locale: {
            format: 'YYYY/MM/DD'
        }
    });
</script>