be632dee6a8157883ad09ef1dfd8a83cc33716c5.php 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <?php $__env->startSection('panel_content'); ?>
  2. <div class="card">
  3. <form id="sort_orders" action="" method="GET">
  4. <div class="card-header row gutters-5">
  5. <div class="col text-center text-md-left">
  6. <h5 class="mb-md-0 h6"><?php echo e(translate('Orders')); ?></h5>
  7. </div>
  8. <div class="col-md-3 ml-auto">
  9. <select class="form-control aiz-selectpicker" data-placeholder="<?php echo e(translate('Filter by Payment Status')); ?>" name="payment_status" onchange="sort_orders()">
  10. <option value=""><?php echo e(translate('Filter by Payment Status')); ?></option>
  11. <option value="paid" <?php if(isset($payment_status)): ?> <?php if($payment_status == 'paid'): ?> selected <?php endif; ?> <?php endif; ?>><?php echo e(translate('Paid')); ?></option>
  12. <option value="unpaid" <?php if(isset($payment_status)): ?> <?php if($payment_status == 'unpaid'): ?> selected <?php endif; ?> <?php endif; ?>><?php echo e(translate('Un-Paid')); ?></option>
  13. </select>
  14. </div>
  15. <div class="col-md-3 ml-auto">
  16. <select class="form-control aiz-selectpicker" data-placeholder="<?php echo e(translate('Filter by Payment Status')); ?>" name="delivery_status" onchange="sort_orders()">
  17. <option value=""><?php echo e(translate('Filter by Deliver Status')); ?></option>
  18. <option value="pending" <?php if(isset($delivery_status)): ?> <?php if($delivery_status == 'pending'): ?> selected <?php endif; ?> <?php endif; ?>><?php echo e(translate('Pending')); ?></option>
  19. <option value="confirmed" <?php if(isset($delivery_status)): ?> <?php if($delivery_status == 'confirmed'): ?> selected <?php endif; ?> <?php endif; ?>><?php echo e(translate('Confirmed')); ?></option>
  20. <option value="on_delivery" <?php if(isset($delivery_status)): ?> <?php if($delivery_status == 'on_delivery'): ?> selected <?php endif; ?> <?php endif; ?>><?php echo e(translate('On delivery')); ?></option>
  21. <option value="delivered" <?php if(isset($delivery_status)): ?> <?php if($delivery_status == 'delivered'): ?> selected <?php endif; ?> <?php endif; ?>><?php echo e(translate('Delivered')); ?></option>
  22. </select>
  23. </div>
  24. <div class="col-md-3">
  25. <div class="from-group mb-0">
  26. <input type="text" class="form-control" id="search" name="search" <?php if(isset($sort_search)): ?> value="<?php echo e($sort_search); ?>" <?php endif; ?> placeholder="<?php echo e(translate('Type Order code & hit Enter')); ?>">
  27. </div>
  28. </div>
  29. </div>
  30. </form>
  31. <?php if(count($orders) > 0): ?>
  32. <div class="card-body p-3">
  33. <table class="table aiz-table mb-0">
  34. <thead>
  35. <tr>
  36. <th>#</th>
  37. <th><?php echo e(translate('Order Code')); ?></th>
  38. <th data-breakpoints="lg"><?php echo e(translate('Num. of Products')); ?></th>
  39. <th data-breakpoints="lg"><?php echo e(translate('Customer')); ?></th>
  40. <th data-breakpoints="lg"><?php echo e(translate('Shop')); ?></th>
  41. <th data-breakpoints="md"><?php echo e(translate('Amount')); ?></th>
  42. <th data-breakpoints="md"><?php echo e(translate('Profit')); ?></th>
  43. <th data-breakpoints="md"><?php echo e(translate('Pick Up Status')); ?></th>
  44. <th data-breakpoints="lg"><?php echo e(translate('Delivery Status')); ?></th>
  45. <th><?php echo e(translate('Payment Status')); ?></th>
  46. <th class="text-right"><?php echo e(translate('Options')); ?></th>
  47. </tr>
  48. </thead>
  49. <tbody>
  50. <?php $__currentLoopData = $orders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $order_id): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  51. <?php
  52. $order = \App\Models\Order::find($order_id->id);
  53. ?>
  54. <?php if($order != null): ?>
  55. <tr>
  56. <td>
  57. <?php echo e($key+1); ?>
  58. </td>
  59. <td>
  60. <a href="#<?php echo e($order->code); ?>" onclick="show_order_details(<?php echo e($order->id); ?>)"><?php echo e($order->code); ?></a>
  61. </td>
  62. <td>
  63. <?php echo e(count($order->orderDetails->where('seller_id', Auth::user()->id))); ?>
  64. </td>
  65. <td>
  66. <?php if($order->user_id != null): ?>
  67. <?php echo e(optional($order->user)->name); ?>
  68. <?php else: ?>
  69. <?php echo e(translate('Guest')); ?> (<?php echo e($order->guest_id); ?>)
  70. <?php endif; ?>
  71. </td>
  72. <td>
  73. <?php
  74. $shop = App\Models\User::where('id',$order->seller_id)->first();
  75. echo $shop['email'];
  76. ?>
  77. </td>
  78. <td>
  79. <?php echo e(single_price($order->grand_total)); ?>
  80. </td>
  81. <td>
  82. <?php if($order->product_storehouse_total > 0): ?>
  83. <?php echo e(single_price($order->grand_total - $order->product_storehouse_total)); ?>
  84. <?php else: ?>
  85. <?php echo e(translate('None')); ?>
  86. <?php endif; ?>
  87. </td>
  88. <td>
  89. <?php if($order->product_storehouse_status): ?>
  90. <span class="badge badge-inline badge-success"><?php echo e(translate('Picked Up')); ?></span>
  91. <?php else: ?>
  92. <?php if($order->product_storehouse_total): ?>
  93. <span class="badge badge-inline badge-danger"><?php echo e(translate('Unpicked Up')); ?></span>
  94. <?php endif; ?>
  95. <?php endif; ?>
  96. </td>
  97. <td>
  98. <?php
  99. $status = $order->delivery_status;
  100. ?>
  101. <?php echo e(translate(ucfirst(str_replace('_', ' ', $status)))); ?>
  102. </td>
  103. <td>
  104. <?php if($order->payment_status == 'paid'): ?>
  105. <span class="badge badge-inline badge-success"><?php echo e(translate('Paid')); ?></span>
  106. <?php else: ?>
  107. <span class="badge badge-inline badge-danger"><?php echo e(translate('Unpaid')); ?></span>
  108. <?php endif; ?>
  109. </td>
  110. <td class="text-right">
  111. <a href="<?php echo e(route('salesman.orders.show', encrypt($order->id))); ?>" class="btn btn-soft-info btn-icon btn-circle btn-sm" title="<?php echo e(translate('Order Details')); ?>">
  112. <i class="las la-eye"></i>
  113. </a>
  114. <a href="<?php echo e(route('salesman.invoice.download', $order->id)); ?>" class="btn btn-soft-warning btn-icon btn-circle btn-sm" title="<?php echo e(translate('Download Invoice')); ?>">
  115. <i class="las la-download"></i>
  116. </a>
  117. </td>
  118. </tr>
  119. <?php endif; ?>
  120. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  121. </tbody>
  122. </table>
  123. <div class="aiz-pagination">
  124. <?php echo e($orders->links()); ?>
  125. </div>
  126. </div>
  127. <?php endif; ?>
  128. </div>
  129. <?php $__env->stopSection(); ?>
  130. <?php $__env->startSection('script'); ?>
  131. <script type="text/javascript">
  132. function sort_orders(el){
  133. $('#sort_orders').submit();
  134. }
  135. </script>
  136. <?php $__env->stopSection(); ?>
  137. <?php echo $__env->make('salesman.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /www/wwwroot/www.easybuyjp.shop/resources/views/salesman/orders/index.blade.php ENDPATH**/ ?>