@php $org = auth()->user()->organization ?? \App\Models\System\Organization::find(auth()->user()->organization_id); @endphp @extends('documents.procurement._layout', [ 'documentTitle' => 'Spend by Supplier', 'reference' => null, 'documentDate' => $reportDate, 'noAutoPrint' => true, ]) @section('header-meta')
|
Suppliers {{ $rows->count() }} |
Total Invoiced {{ number_format($grandInvoiced, 0) }} |
Total Paid {{ number_format($grandPaid, 0) }} |
Outstanding {{ number_format($grandBalance, 0) }} |
No invoices found for this period.
@else| Supplier | Invoices | Total Invoiced ({{ $currency }}) | Total Paid ({{ $currency }}) | Outstanding ({{ $currency }}) | % Paid |
|---|---|---|---|---|---|
| {{ $row->supplier?->name ?? '—' }} | {{ $row->invoice_count }} | {{ number_format((float)$row->total_invoiced, 2) }} | {{ number_format((float)$row->total_paid, 2) }} | {{ number_format($balance, 2) }} | {{ $pct }}% |
| TOTAL | {{ $rows->sum('invoice_count') }} | {{ number_format($grandInvoiced, 2) }} | {{ number_format($grandPaid, 2) }} | {{ number_format($grandBalance, 2) }} |