@php $prepaidRows = $totals['prepaid_rows'] ?? []; $prepaidAmount = (float) ($totals['prepaid'] ?? 0); $collectedTodayAmount = (float) ($totals['collected_today'] ?? 0); $collectedCount = (int) ($totals['collected_count'] ?? 0); $fullyPaidCount = (int) ($totals['fully_paid_count'] ?? 0); $partiallyPaidCount = (int) ($totals['partially_paid_count'] ?? 0); @endphp
Expected Today

KES {{ number_format($totals['expected'] ?? 0, 0) }} ({{ number_format($totals['client_count'] ?? 0, 0) }} {{ ($totals['client_count'] ?? 0) === 1 ? 'client' : 'clients' }})

Collected Today

KES {{ number_format($totals['collected'] ?? 0, 0) }} @if ($collectedCount > 0) ({{ number_format($collectedCount, 0) }} paid) @endif

Today KES {{ number_format($collectedTodayAmount, 0) }} · Prepaid KES {{ number_format($prepaidAmount, 0) }} @if ($prepaidAmount > 0.01 && count($prepaidRows) > 0) @endif

@if ($fullyPaidCount > 0 || $partiallyPaidCount > 0)

{{ number_format($fullyPaidCount, 0) }} fully paid · {{ number_format($partiallyPaidCount, 0) }} partially paid

@endif
Outstanding

KES {{ number_format($totals['outstanding'] ?? 0, 0) }} @if (($totals['outstanding_count'] ?? 0) > 0) ({{ number_format($totals['outstanding_count'] ?? 0, 0) }} {{ ($totals['outstanding_count'] ?? 0) === 1 ? 'client' : 'clients' }}) @endif

Collection %

{{ number_format($totals['collection_pct'] ?? 0, 1) }}%

@if (count($prepaidRows) > 0)

Prepaid toward today's installments ({{ count($prepaidRows) }} {{ count($prepaidRows) === 1 ? 'receipt' : 'receipts' }})

@foreach ($prepaidRows as $prepaidRow) @endforeach
Client Amount Date paid Status
{{ $prepaidRow['name'] }} {{ number_format((float) $prepaidRow['amount'], 0) }} {{ $prepaidRow['paid_on'] }} {{ $prepaidRow['status'] }}
@endif
@if (($totals['maturing_count'] ?? 0) > 0)
{{ number_format((int) $totals['maturing_count'], 0) }} {{ ((int) $totals['maturing_count']) === 1 ? 'loan is' : 'loans are' }} on their final installment and maturity date today — repeat-client opportunity.
@endif