@include('modules.reports.partials.pdf-company-details')

Supplier Statement Report

Generated: {{ date('F j, Y') }}
Period: {{ $dateFrom }} to {{ $dateTo }}
Currency: {{ $currencyName }}
@forelse($allStatements as $statement) @php $supplier = $statement['supplier']; $metrics = $statement['metrics']; $aged = $statement['agedBalances']; $register = $statement['invoiceRegister']; $payments = $statement['paymentHistory']; @endphp

{{ $supplier->supplier_name }}

Code: {{ $supplier->supplier_code ?? 'N/A' }}
Current Balance {{ number_format($metrics['currentBalance'], 2) }} Total Invoices {{ number_format($metrics['totalInvoicesAmount'], 2) }}
Total Payments {{ number_format($metrics['totalPayments'], 2) }} Status Counts Pending: {{ $metrics['countPending'] }}, Approved: {{ $metrics['countApproved'] }}, Paid: {{ $metrics['countPaid'] }}, Rejected: {{ $metrics['countRejected'] }}
Aged 0-30 {{ number_format($aged['0_30'], 2) }} Aged 31-60 {{ number_format($aged['31_60'], 2) }}
Aged 61+ {{ number_format($aged['61_plus'], 2) }}
Invoice Register
@forelse($register as $row) @empty @endforelse
Invoice # Date Description Status Total Paid Balance
{{ $row['invoice_number'] }} {{ $row['invoice_date'] }} {{ $row['description'] ?: 'N/A' }} {{ $row['status'] }} {{ number_format($row['total'], 2) }} {{ number_format($row['paid'], 2) }} {{ number_format($row['balance'], 2) }}
No invoices found.
Payment History
@forelse($payments as $payment) @empty @endforelse
Date Reference Description Applied Invoices Amount Unapplied
{{ $payment['date'] }} {{ $payment['reference'] }} {{ $payment['description'] }} {{ count($payment['applied_to']) ? implode(', ', $payment['applied_to']) : 'Unallocated' }} {{ number_format($payment['amount'], 2) }} {{ number_format($payment['unapplied'], 2) }}
No payments found.
@empty

No supplier statement data available for the selected filters.

@endforelse