@php $fromLabel = $filters['from'] ?? now()->toDateString(); $toLabel = $filters['to'] ?? now()->toDateString(); $periodLabel = $fromLabel === $toLabel ? \Carbon\Carbon::parse($fromLabel)->format('j M Y') : \Carbon\Carbon::parse($fromLabel)->format('j M Y').' – '.\Carbon\Carbon::parse($toLabel)->format('j M Y'); $amountTotal = (float) ($registerTotals['period'] ?? $registerTotals['today'] ?? 0); $receiptCount = (int) ($registerTotals['receipts'] ?? 0); $principalTotal = (float) ($allocationTotals['principal'] ?? 0); $interestTotal = (float) ($allocationTotals['interest'] ?? 0); $feesTotal = (float) ($allocationTotals['fees'] ?? 0); $penaltyTotal = (float) ($allocationTotals['penalty'] ?? 0); $overpaymentTotal = (float) ($allocationTotals['overpayment'] ?? 0); @endphp
Collected ({{ $periodLabel }})

KES {{ number_format($amountTotal, 0) }}

{{ number_format($receiptCount, 0) }} {{ $receiptCount === 1 ? 'receipt' : 'receipts' }}

Principal

KES {{ number_format($principalTotal, 0) }}

Interest

KES {{ number_format($interestTotal, 0) }}

Fees

KES {{ number_format($feesTotal, 0) }}

Penalty

KES {{ number_format($penaltyTotal, 0) }}

Overpayment

KES {{ number_format($overpaymentTotal, 0) }}