@php $bucketText = fn (string $bucket): string => match ($bucket) { '0–30 days' => 'text-emerald-600', '31–60 days' => 'text-amber-600', '61–90 days' => 'text-orange-600', 'Over 90 days' => 'text-rose-600', default => 'text-slate-900', }; $bucketColor = fn (string $bucket): string => match ($bucket) { '0–30 days' => 'emerald', '31–60 days' => 'amber', '61–90 days' => 'orange', 'Over 90 days' => 'rose', default => 'gray', }; @endphp
@foreach ($buckets as $bucket => $amountDue)
{{ $bucket }}
{{ money($amountDue, false) }}
@endforeach
Total outstanding
{{ money($total, false) }}
@if (request()->hasAny(['q', 'as_of'])) Clear @endif
@if ($rows->isEmpty()) @else
@foreach ($rows as $row) @endforeach
Supplier GRN Invoice Received Age Amount Bucket
{{ $row['party'] }} {{ $row['reference'] }} {{ $row['detail'] ?? '—' }} {{ $row['date']?->format('d M Y') ?? '—' }} {{ number_format($row['age']) }} d {{ money($row['amount'], false) }}
Total outstanding {{ money($total, false) }}
@endif
By supplier
Outstanding balance per creditor
@if ($bySupplier->isEmpty())

No supplier balances in this view.

@else
    @foreach ($bySupplier as $supplier => $amountDue)
  • {{ $supplier }} {{ money($amountDue, false) }}
  • @endforeach
Total {{ money($total, false) }}
@endif