orders.blade.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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>Trx</th>
  13. </tr>
  14. </thead>
  15. <tbody>
  16. @foreach ($orders as $order)
  17. <tr @if ($order->is_cancelled) class="cancelled-order" @endif>
  18. <td><a href="{{ route('admin.orders.view.dashboard', $order) }}">{{ $order->orderNumber() }}</a>
  19. </td>
  20. <td>{{ friendly_date($order->created_at) }}</td>
  21. <td>{{ displayAmount('$', $order->total()) }}</td>
  22. <td>
  23. <div>
  24. @include('app.my-account.admin.orders.forms.create-charge')
  25. </div>
  26. <div>
  27. <table class="table table-sm table-hover table-striped table-bordered mb-0">
  28. <thead>
  29. <tr>
  30. <th>Date</th>
  31. <th>Charge/Refund</th>
  32. <th>Amount</th>
  33. <th>Payment Method</th>
  34. <th></th>
  35. </tr>
  36. </thead>
  37. <tbody>
  38. @foreach ($order->financialTransactions as $transaction)
  39. <tr>
  40. <td>{{ friendly_date($transaction->created_at) }}</td>
  41. <td>{{ $transaction->charge_or_refund }}</td>
  42. <td>${{ $transaction->amount }}</td>
  43. <td>{!! $transaction->paymentMethod->displayName() !!}</td>
  44. <td>
  45. @if ($transaction->charge_or_refund == 'CHARGE')
  46. @include('app.my-account.admin.orders.forms.create-refund')
  47. @endif
  48. </td>
  49. </tr>
  50. @endforeach
  51. </tbody>
  52. </table>
  53. </div>
  54. </td>
  55. </tr>
  56. @endforeach
  57. </tbody>
  58. </table>
  59. </div>
  60. </div>
  61. <div class="mt-3">
  62. {{ $orders->appends(request()->input())->links() }}
  63. </div>
  64. @endsection