Laporan Voucher Penagihan

@php $namaBulan = [ '01' => 'Januari', '02' => 'Februari', '03' => 'Maret', '04' => 'April', '05' => 'Mei', '06' => 'Juni', '07' => 'Juli', '08' => 'Agustus', '09' => 'September', '10' => 'Oktober', '11' => 'November', '12' => 'Desember', ]; $monthKey = str_pad($bulan, 2, '0', STR_PAD_LEFT); $periode = $namaBulan[$monthKey] ?? 'Bulan ' . $monthKey; $totalTagihan = $vouchers->sum('nominal_tagihan'); $totalBayar = $vouchers->sum('nominal_bayar'); @endphp

Periode: {{ $periode }} {{ $tahun }}

@foreach ($vouchers as $voucher) @endforeach
No Nama Pelanggan No. HP Tagihan Status Waktu Tagihan
{{ $loop->iteration }} {{ $voucher->nama_pelanggan }} {{ $voucher->no_hp ?? '-' }} {{ number_format($voucher->nominal_tagihan, 0, ',', '.') }} {{ $voucher->status_bayar ? ucfirst($voucher->status_bayar) : '-' }} {{ $voucher->waktu_tagihan ? \Carbon\Carbon::parse($voucher->waktu_tagihan)->format('d M Y') : '-' }}
Total Tagihan: Rp. {{ number_format($totalTagihan ?: 0, 0, ',', '.') }}
Total Bayar: Rp. {{ number_format($totalBayar ?: 0, 0, ',', '.') }}