@php $money = fn ($value) => 'R '.number_format((float) $value, 2); $company = $company ?? \App\Models\CompanySetting::current(); $bankingLines = $company->bankingDetailsLines('the relevant invoice number'); @endphp

Client statement

{{ $client->name }}

{{ $period['start']->format('d M Y') }} to {{ $period['end']->format('d M Y') }}

Invoiced

{{ $money($totals['total_invoiced']) }}

Paid

{{ $money($totals['total_paid']) }}

Credited

{{ $money($totals['total_credited'] ?? 0) }}

Outstanding

{{ $money($totals['outstanding_balance']) }}

@forelse ($unpaidInvoices as $invoice) @empty @endforelse
Invoice Due Status Balance
{{ $invoice->invoice_number }} {{ $invoice->due_date->format('d M Y') }} {{ $invoice->statusLabel() }} {{ $money($invoice->remainingBalance()) }}
No unpaid invoices in this statement period.
@if ($creditNotes->isNotEmpty())

Credit notes

@foreach ($creditNotes as $creditNote) @endforeach
Date Credit note Invoice Type Amount
{{ $creditNote->issue_date->format('d M Y') }} {{ $creditNote->credit_note_number }} {{ $creditNote->invoice?->invoice_number ?? 'No invoice' }} {{ $creditNote->typeLabel() }} {{ $money($creditNote->amount) }}
@endif @if ($payments->isNotEmpty())

Payments

@foreach ($payments as $payment) @endforeach
Date Invoice Method Amount
{{ $payment->payment_date->format('d M Y') }} {{ $payment->invoice?->invoice_number ?? 'No invoice' }} {{ $payment->methodLabel() }} {{ $money($payment->amount_paid) }}
@endif