Current File : //home/tradevaly/www/storage/framework/views/ecadb26b0113edd4a77cfafce976ecacad2475a6.php
<?php $__env->startPush('title','All Orders'); ?>
<?php $__env->startPush('style'); ?>
    <link href="<?php echo e(asset('/assets/libs/datatables/datatables.min.css')); ?>" rel="stylesheet" type="text/css" />
<?php $__env->stopPush(); ?>

<?php $__env->startSection('content'); ?>
`   <div class="container-fluid">
  <div class="row">
    <div class="col-md-12">
      <div class="card">
        <div class="card-header card-header-info card-header-icon">
          <h4 class="card-title">Orders Table</h4>
        </div>
        <div class="card-body">
          <div class="table-responsive">
            <table class="table">
              <thead>
                <tr>
                  <th class="text-center">#</th>
                  <th>Order Number</th>
                  <th>Quantity</th>
                  <th>Total Amount</th>
                  <th>Status</th>
                  <th>Payment Type</th>
                  <th>Payment Status</th>
                  <th>Order Date</th>
                </tr>
              </thead>
              <tbody>
                  <?php $__empty_1 = true; $__currentLoopData = $orders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $order): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <tr>
                        <td><?php echo e($loop->iteration); ?></td>
                        <td>
                            <a href="<?php echo e(route('admin.order.view',$order->order_id)); ?>"><?php echo e($order->order_id); ?></a>
                        </td>
                        <td><?php echo e(App\Models\OrderItem::where('order_id',$order->order_id)->where('vendor_id',auth()->id())->sum('quantity')); ?></td>
                        <td><?php echo e($order->total_amount); ?></td>
                        <td>
                            <?php if($order->orderItem->status == "new"): ?>
                            <button type="button" class="btn btn-primary" style="width: 100px;text-align: center;"><?php echo e($order->orderItem->status); ?></button>
                            <?php elseif($order->orderItem->status == "pending"): ?>
                            <button type="button" class="btn btn-warning" style="width: 100px;text-align: center;"><?php echo e($order->orderItem->status); ?></button>
                            <?php elseif($order->orderItem->status == "cancel"): ?>
                            <button type="button" class="btn btn-danger" style="width: 100px;text-align: center;"><?php echo e($order->orderItem->status); ?></button>
                            <?php elseif($order->orderItem->status == "delevered"): ?>
                            <button type="button" class="btn btn-success" style="width: 100px;text-align: center;"><?php echo e($order->orderItem->status); ?></button>
                            <?php endif; ?>
                        </td>
                        <td ><?php echo e($order->order->payment_type); ?></td>
                        <td >
                            <form action="<?php echo e(route('admin.order.payment.status',$order->order->id)); ?>" method="post" class="d-flex">
                              <select name="payment_status" id="" class="<?php echo e($order->order->payment_status=="paid" ?'bg-success':'bg-warning'); ?> text-white form-control border border-dark">
                                <option value="paid" <?php echo e($order->order->payment_status=="paid" ?'selected':''); ?>>Paid</option>
                                <option value="unpaid"<?php echo e($order->order->payment_status=="unpaid" ?'selected':''); ?>>Un Paid</option>
                              </select>
                              <button type="submit" style="padding: 5px;border: 1px solid gray;border-radius: 15%;margin-left: 10px;"><i class="fas fa-arrow-up"></i></button>
                            </form>
                            <!--<?php if($order->order->payment_status == "paid"): ?>-->
                            <!--<button type="button" class="btn btn-success" style="width: 100px;text-align: center;"><?php echo e($order->order->payment_status); ?></button>-->
                            <!--<?php else: ?>-->
                            <!--<button type="button" class="btn btn-warning" style="width: 100px;text-align: center;"><?php echo e($order->order->payment_status); ?></button>-->
                            <!--<?php endif; ?>-->
                        </td>
                        <td ><?php echo e($order->created_at->format('d-m-Y')); ?></td>
                    </tr>
                 <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <tr>
                        <td colspan="6" style="text-align: center;"><strong class="text-danger">No Orders</strong></td>
                    </tr>
                 <?php endif; ?>
              </tbody>
            </table>
          </div>
        </div>
        <div class="card-footer">
            <?php echo e($orders->links()); ?>

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





<?php echo $__env->make('backend.ayaan.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/tradevaly/public_html/resources/views/backend/pages/order/index.blade.php ENDPATH**/ ?>