| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <table>
- <thead>
- <tr>
- <th colspan="5">Laporan Mutasi</th>
- </tr>
- <tr>
- <th colspan="5" rowspan="2">Periode {{ $mutations->first()->created_at }} -
- {{ $mutations->last()->created_at }} </th>
- </tr>
- <tr></tr>
- <tr>
- <th>#</th>
- <th>Tanggal</th>
- <th>Tipe</th>
- <th>Nilai</th>
- </tr>
- </thead>
- <tbody>
- @foreach ($mutations->chunk(100) as $chunk)
- @foreach ($chunk as $index => $mutation)
- <tr>
- <td>{{ ++$index }}</td>
- <td>{{ $mutation->created_at }}</td>
- <td>{{ $mutation->type }}</td>
- <td>{{ $mutation->amount }}</td>
- </tr>
- @endforeach
- @endforeach
- <tr>
- <td colspan="3">Total</td>
- </tr>
- <tr>
- <td colspan="3">Pendapatan</td>
- <td>{{ (new App\Services\MutationService())->totalIncomeAsString($mutations) }}</td>
- </tr>
- <tr>
- <td colspan="3">Pengeluran</td>
- <td>{{ (new App\Services\MutationService())->totalExpenseAsString($mutations) }}</td>
- </tr>
- <tr>
- <td colspan="3">Jumlah</td>
- <td>{{ (new App\Services\MutationService())->totalAmountAsString($mutations) }}</td>
- </tr>
- </tbody>
- </table>
|