@include('templates.pdf_header', [ 'organisation' => $organisation, 'asOfDate' => \Carbon\Carbon::parse($date)->format('d M Y'), 'title' => 'Debtors Aging Report' ])
@php $totals = [ '0_30' => 0, '31_60' => 0, '61_90' => 0, '90_plus' => 0, 'total' => 0 ]; @endphp @forelse ($rows as $row) @php $totals['0_30'] += $row['0_30']; $totals['31_60'] += $row['31_60']; $totals['61_90'] += $row['61_90']; $totals['90_plus'] += $row['90_plus']; $totals['total'] += $row['total']; @endphp @empty @endforelse
Customer 0 – 30 Days 31 – 60 Days 61 – 90 Days 90+ Days Total
{{ $row['customer'] }} {{ number_format($row['0_30'], 2) }} {{ number_format($row['31_60'], 2) }} {{ number_format($row['61_90'], 2) }} {{ number_format($row['90_plus'], 2) }} {{ number_format($row['total'], 2) }}
No outstanding invoices found
Total {{ number_format($totals['0_30'], 2) }} {{ number_format($totals['31_60'], 2) }} {{ number_format($totals['61_90'], 2) }} {{ number_format($totals['90_plus'], 2) }} {{ number_format($totals['total'], 2) }}