

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


<!-- Begin Page Content -->
<div class="container-fluid">
 

  <!-- DataTales Example -->
  <div class="card shadow mb-4">
    <div class="card-header py-3">
      <h6 class="m-0 font-weight-bold text-primary">Comission List | Per-Order</h6>
      <?php if(count($errors) > 0): ?>
                  <?php if($errors->any()): ?>
                    <div class="alert alert-primary" role="alert">
                      <?php echo e($errors->first()); ?>

                      <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                        <span aria-hidden="true">×</span>
                      </button>
                    </div>
                  <?php endif; ?>
              <?php endif; ?>
              <form action="<?php echo e(route('cityadminsearchcomission')); ?>" method="post">
        <?php echo e(csrf_field()); ?>

<input type="date" value="<?php echo e(Request::input('startdate')); ?>"  name="startdate" class="form-control" placeholder="Enter Start" style="width: 20%; display: inline;">
<input type="date" value="<?php echo e(Request::input('enddate')); ?>"  name="enddate" class="form-control" placeholder="Enter End" style="width: 20%; display: inline;">
<input type="hidden" value="<?php echo e(Request::input('delivery_boy_id')); ?>" name="delivery_boy_id"/>


<select class="form-control form-control-sm" id="exampleFormControlSelect3 " name="delivery_boy_id" style="width: 20%; display: inline;" >
                      <?php $__currentLoopData = $delivery_boy; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $deliveryboy): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
		          	<option value="<?php echo e($deliveryboy->delivery_boy_id); ?>" ><?php echo e($deliveryboy->delivery_boy_name); ?></option>
		              <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> 
                     
                    </select>
<button type="submit" class="btn btn-success btn-md" value="Search" style="margin-top: -5px;"><i class="fa fa-search"></i></button>
</form>
<div class="img-responsive col-xs-3 text-right">
     <?php if(isset($_REQUEST["startdate"]) && isset($_REQUEST["enddate"] )): ?>
     <b> <a href="<?php echo e(route('cityadminexcelgenerator',['startdate' =>$_REQUEST["startdate"] , 'enddate' => $_REQUEST["enddate"] , 'delivery_boy_id' => $_REQUEST["delivery_boy_id"] ])); ?>">Download Excel </a></b>
    <?php else: ?>
      <b> <a href="<?php echo e(route('cityadminallexcelgenerator')); ?>">Download Excel Report</a></b>
    <?php endif; ?>
    </div>
              <br>
    </div>
    <div class="card-body">
      <div class="table-responsive">
        <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
          <thead>
            <tr>
            <th>S.No</th>
            <th>Order ID</th>
            <th>User Name</th>
            <th>Delivery Boy Name</th>
            <th>Total Product Price</th>
            <th>Comission Price</th>
            <th>Order Date</th>
            <th>Amount Status</th>
            <th>Payment method</th>

            
            </tr>
          </thead>
          <tfoot>
            <tr>
            <th>S.No</th>
            <th>Order ID</th>
            <th>User Name</th>
            <th>Delivery Boy Name</th>
            <th>Total Product Price</th>
            <th>Comission Price</th>
            <th>Order Date</th>
            <th>Amount Status</th>
            <th>Payment method</th>

            
            </tr>
          </tfoot>
          <tbody>
          <?php if(count($orders)>0): ?>
                          <?php $i=1; ?>
                          <?php $__currentLoopData = $orders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $comission): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr>
                            <td><?php echo e($i); ?></td>
                            <td><?php echo e($comission->cart_id); ?></td>
                            <td><?php echo e($comission->user_name); ?></td>
                            <td><?php echo e($comission->delivery_boy_name); ?></td>
                            <td><?php echo e($comission->total_price); ?></td>
                            <td><?php echo e($comission->comission_price); ?></td>
                            <td><?php echo e($comission->order_date); ?></td>
                             <td>
                                <?php if($comission->status=="Pending"): ?>
                        <span style="color:red;">Pending</span>
                            <?php else: ?>
                             <span style="color:green;">Paid</span>
                             <?php endif; ?>
                            </td>
                          
                            <td><?php echo e($comission->payment_method); ?></td>

                            
                            
                            

                        </tr>
                        <?php $i++; ?>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                      <?php else: ?>
                        <tr>
                          <td>No data found</td>
                        </tr>
                      <?php endif; ?>
                       
          </tbody>
        </table>
      </div>
    </div>
  </div>

</div>
<!-- /.container-fluid -->
</div>
</div>
<?php $__currentLoopData = $orders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $comission): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
	<div class="modal-dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<h5 class="modal-title" id="exampleModalLabel">Delete area</h5>
					<button type="button" class="close" data-dismiss="modal" aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
			</div>
			<div class="modal-body">
				Are you want to delete area.
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
				<a href="" class="btn btn-primary">Delete</a>
			</div>
		</div>
	</div>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>   
<?php $__env->stopSection(); ?>
<?php echo $__env->make('cityadmin.layout.app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>