{{-- resources/views/accounting/ar/aging.blade.php --}} @extends('admin.admin_dashboard') @section('admin')
{{-- Breadcrumb & PDF export --}}
@php $tot = ['current'=>0,'b1'=>0,'b2'=>0,'b3'=>0,'b4'=>0,'total'=>0]; @endphp @foreach($rows as $i => $r) @php $tot['current'] += $r->current; $tot['b1'] += $r->b1; $tot['b2'] += $r->b2; $tot['b3'] += $r->b3; $tot['b4'] += $r->b4; $tot['total'] += $r->total; @endphp @endforeach
# Party Ref Due Date Current 1–30 31–60 61–90 >90 Total
{{ $i + 1 }} {{ $r->party }} {{ $r->reference }} {{ $r->due_date }} {{ number_format($r->current, 2) }} {{ number_format($r->b1, 2) }} {{ number_format($r->b2, 2) }} {{ number_format($r->b3, 2) }} {{ number_format($r->b4, 2) }} {{ number_format($r->total,2) }}
Grand Total {{ number_format($tot['current'],2) }} {{ number_format($tot['b1'], 2) }} {{ number_format($tot['b2'], 2) }} {{ number_format($tot['b3'], 2) }} {{ number_format($tot['b4'], 2) }} {{ number_format($tot['total'], 2) }}
@endsection