@php $scheduleRows = $schedulePresentation['rows'] ?? []; $scheduleSummary = $schedulePresentation['summary'] ?? []; $usesBookedSchedule = (bool) ($schedulePresentation['uses_booked_schedule'] ?? false); $compact = (bool) ($compact ?? false); $loanFeesPenalties = (float) ($scheduleSummary['loan_fees_penalties_outstanding'] ?? 0); $totalAmountDue = (float) ($scheduleSummary['total_amount_due'] ?? ($scheduleSummary['total_remaining'] ?? 0)); @endphp @if (! $usesBookedSchedule)
Fees & penalties outstanding: KES {{ number_format($loanFeesPenalties, 2) }}
@endifBooked repayment schedule from loan booking. Use + to view how processed payments were allocated to each installment. The same payment may appear under multiple installments when its amount was split across dues.
@unless ($compact)Installments
{{ $scheduleSummary['count'] ?? 0 }}
Total due
KES {{ number_format((float) ($scheduleSummary['total_due'] ?? 0), 2) }}
Paid
KES {{ number_format((float) ($scheduleSummary['total_paid'] ?? 0), 2) }}
Schedule remaining
KES {{ number_format((float) ($scheduleSummary['total_remaining'] ?? 0), 2) }}
Fees & penalties
KES {{ number_format($loanFeesPenalties, 2) }}
Total amount due
KES {{ number_format($totalAmountDue, 2) }}
Overdue
{{ $scheduleSummary['overdue_count'] ?? 0 }}
| # | Due date | Principal | Interest | Fees | Total | Paid | Remaining | Status | DPD | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @if (! empty($row['has_allocations'])) @endif | {{ $row['installment_no'] }} | {{ $row['due_date'] ?? '—' }} | {{ number_format((float) ($row['principal_due'] ?? 0), 2) }} | {{ number_format((float) ($row['interest_due'] ?? 0), 2) }} | {{ number_format((float) (($row['fees_due'] ?? 0) + ($row['penalty_due'] ?? 0)), 2) }} | {{ number_format((float) ($row['total_due'] ?? 0), 2) }} | {{ number_format((float) ($row['total_paid'] ?? 0), 2) }} | {{ number_format((float) ($row['remaining_balance'] ?? 0), 2) }} | {{ str_replace('_', ' ', (string) ($row['status'] ?? '')) }} | {{ $row['dpd'] ?? 0 }} | ||||||||||||
|
Payment allocations — installment #{{ $row['installment_no'] }} Each row is an allocation slice from a processed payment, not a separate payment.
|
||||||||||||||||||||||
| Schedule remaining | {{ number_format((float) ($scheduleSummary['total_remaining'] ?? 0), 2) }} | |||||||||||||||||||||
| Fees & penalties | {{ number_format($loanFeesPenalties, 2) }} | |||||||||||||||||||||
| Total amount due | {{ number_format($totalAmountDue, 2) }} | |||||||||||||||||||||