orders.blade.php 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. @extends('app.my-account.admin.users.single')
  2. @section('details')
  3. <div class="my-4">
  4. <h4><b>Orders as Client</b></h4>
  5. <div class="table-responsive">
  6. <table class="table table-sm table-hover table-striped table-bordered mb-0">
  7. <thead>
  8. <tr>
  9. <th>IID</th>
  10. <th>Created At</th>
  11. <th>Total Amount</th>
  12. <th>Tests</th>
  13. <th>Trx</th>
  14. </tr>
  15. </thead>
  16. <tbody>
  17. @foreach ($orders as $order)
  18. <tr @if ($order->is_cancelled) class="cancelled-order" @endif>
  19. <td><a href="{{ route('admin.orders.view.dashboard', $order) }}">{{ $order->orderNumber() }}</a>
  20. </td>
  21. <td>{{ friendly_date($order->created_at) }}</td>
  22. <td>{{ displayAmount('$', $order->total()) }}</td>
  23. <td>
  24. @include('app.my-account.admin.orders.partials.order-tests-summary')
  25. </td>
  26. <td>
  27. <div>
  28. @include('app.my-account.admin.orders.forms.create-charge')
  29. </div>
  30. <div>
  31. <table class="table table-sm table-hover table-striped table-bordered mb-0">
  32. <thead>
  33. <tr>
  34. <th>Date</th>
  35. <th>Charge/Refund</th>
  36. <th>Amount</th>
  37. <th>Payment Method</th>
  38. <th></th>
  39. </tr>
  40. </thead>
  41. <tbody>
  42. @foreach ($order->financialTransactions as $transaction)
  43. <tr>
  44. <td>{{ friendly_date($transaction->created_at) }}</td>
  45. <td>{{ $transaction->charge_or_refund }}</td>
  46. <td>${{ $transaction->amount }}</td>
  47. <td>{!! $transaction->paymentMethod->displayName() !!}</td>
  48. <td>
  49. @if ($transaction->charge_or_refund == 'CHARGE')
  50. @include('app.my-account.admin.orders.forms.create-refund')
  51. @endif
  52. </td>
  53. </tr>
  54. @endforeach
  55. </tbody>
  56. </table>
  57. </div>
  58. </td>
  59. </tr>
  60. @endforeach
  61. </tbody>
  62. </table>
  63. </div>
  64. </div>
  65. <div class="mt-3">
  66. {{ $orders->appends(request()->input())->links() }}
  67. </div>
  68. @endsection