mutation-report.blade.php 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <table>
  2. <thead>
  3. <tr>
  4. <th colspan="5">Laporan Mutasi</th>
  5. </tr>
  6. <tr>
  7. <th colspan="5" rowspan="2">Periode {{ $mutations->first()->created_at }} -
  8. {{ $mutations->last()->created_at }} </th>
  9. </tr>
  10. <tr></tr>
  11. <tr>
  12. <th>#</th>
  13. <th>Tanggal</th>
  14. <th>Tipe</th>
  15. <th>Nilai</th>
  16. </tr>
  17. </thead>
  18. <tbody>
  19. @foreach ($mutations->chunk(100) as $chunk)
  20. @foreach ($chunk as $index => $mutation)
  21. <tr>
  22. <td>{{ ++$index }}</td>
  23. <td>{{ $mutation->created_at }}</td>
  24. <td>{{ $mutation->type }}</td>
  25. <td>{{ $mutation->amount }}</td>
  26. </tr>
  27. @endforeach
  28. @endforeach
  29. <tr>
  30. <td colspan="3">Total</td>
  31. </tr>
  32. <tr>
  33. <td colspan="3">Pendapatan</td>
  34. <td>{{ (new App\Services\MutationService())->totalIncomeAsString($mutations) }}</td>
  35. </tr>
  36. <tr>
  37. <td colspan="3">Pengeluran</td>
  38. <td>{{ (new App\Services\MutationService())->totalExpenseAsString($mutations) }}</td>
  39. </tr>
  40. <tr>
  41. <td colspan="3">Jumlah</td>
  42. <td>{{ (new App\Services\MutationService())->totalAmountAsString($mutations) }}</td>
  43. </tr>
  44. </tbody>
  45. </table>