@include('templates.pdf_header', [ 'organisation' => $organisation, 'asOfDate' => \Carbon\Carbon::parse($reportDate)->format('d M Y'), 'title' => 'Creditors Aging Report' ])
@php $totals = ['0_30'=>0,'31_60'=>0,'61_90'=>0,'90_plus'=>0,'outstanding'=>0]; @endphp @foreach($rows as $row) @php $totals['0_30'] += $row->age_0_30; $totals['31_60'] += $row->age_31_60; $totals['61_90'] += $row->age_61_90; $totals['90_plus'] += $row->age_90_plus; $totals['outstanding'] += $row->outstanding; @endphp @endforeach
Supplier 0–30 Days 31–60 Days 61–90 Days 90+ Days Total Outstanding
{{ $row->supplier->name }} {{ number_format($row->age_0_30,2) }} {{ number_format($row->age_31_60,2) }} {{ number_format($row->age_61_90,2) }} {{ number_format($row->age_90_plus,2) }} {{ number_format($row->outstanding,2) }}
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['outstanding'],2) }}