Tahun: {{ $tahun }}
| No. | Kategori Kas | @foreach ($bulanList as $bulan){{ $bulan }} | @endforeachTotal |
|---|---|---|---|
| {{ $index + 1 }} | {{ ucfirst($row['kategori']) }} | @php $totalPerKategori = 0; @endphp @foreach ($bulanList as $bulan) @php $totalPerKategori += $row[$bulan]; @endphpRp {{ number_format($row[$bulan], 0, ',', '.') }} | @endforeachRp {{ number_format($totalPerKategori, 0, ',', '.') }} |
| Jumlah | @php $grandTotal = 0; @endphp @foreach ($bulanList as $bulan) @php $jumlahBulan = end($table_result)[$bulan]; $grandTotal += $jumlahBulan; @endphpRp {{ number_format($jumlahBulan, 0, ',', '.') }} | @endforeachRp {{ number_format($grandTotal, 0, ',', '.') }} | |
| Kenaikan / Penurunan (%) | @php $jumlahRow = end($table_result); $prevValue = null; @endphp @foreach ($bulanList as $bulan) @php $currentValue = $jumlahRow[$bulan]; if (is_null($prevValue)) { $change = '-'; } else { $change = $prevValue == 0 ? '0' : number_format((($currentValue - $prevValue) / $prevValue) * 100, 2) . '%'; } $prevValue = $currentValue; @endphp{{ $change }} | @endforeach— |
Terbilang: {{ $terbilang }} RUPIAH