transaction-report.blade.php 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <table>
  2. <thead>
  3. <tr>
  4. <th colspan="4">Laporan Transaksi</th>
  5. </tr>
  6. <tr>
  7. <th colspan="4" rowspan="2">Periode {{ $transactions->first()['createdAt'] }} -
  8. {{ $transactions->last()['createdAt'] }} </th>
  9. </tr>
  10. <tr></tr>
  11. <tr>
  12. <th>#</th>
  13. <th>Tanggal</th>
  14. <th>Jumlah Transaksi</th>
  15. <th>Total Nilai</th>
  16. </tr>
  17. </thead>
  18. <tbody>
  19. @foreach ($transactions->chunk(100) as $chunk)
  20. @foreach ($chunk as $index => $transaction)
  21. <tr>
  22. <td>{{ ++$index }}</td>
  23. <td>{{ $transaction['createdAt'] }}</td>
  24. <td>{{ $transaction['totalTransaction'] }}</td>
  25. <td>{{ (new App\Services\CurrencyFormatService)->setRupiahFormat($transaction['totalPrice'], true) }}</td>
  26. </tr>
  27. @endforeach
  28. @endforeach
  29. <tr>
  30. <td colspan="2">Total</td>
  31. </tr>
  32. <tr>
  33. <td colspan="2">Transaksi / Nilai</td>
  34. <td>{{ $transactions->sum('totalTransaction') }}</td>
  35. <td>{{ (new App\Services\CurrencyFormatService)->setRupiahFormat($transactions->sum('totalPrice'), true) }}</td>
  36. </tr>
  37. </tbody>
  38. </table>