@foreach([
['Principal (USD)', '$'.number_format($loan->amountInUsd(),2)],
['Principal (LRD)', 'L$'.number_format($loan->amountInLrd(),2)],
['Interest Rate', $loan->interest_rate.'% p.a.'],
['Term', $loan->term_months.' months'],
['Monthly (USD)', '$'.number_format($loan->monthly_installment,2)],
['Monthly (LRD)', 'L$'.number_format($loan->monthly_installment_lrd,2)],
['Exchange Rate', 'L$'.number_format($loan->getEffectiveRate(),2).'=US$1'],
['Amount Paid (USD)', '$'.number_format($loan->amount_paid,2)],
['Outstanding (USD)', '$'.number_format($loan->outstanding_balance,2)],
['Outstanding (LRD)', 'L$'.number_format($loan->outstanding_balance_lrd,2)],
['Disbursed', $loan->disbursed_at?->format('M d, Y') ?? 'Pending'],
['Final Due Date', $loan->due_date?->format('M d, Y') ?? '—'],
] as [$label,$value])
{{ $label }}
{{ $value }}
@endforeach
@if($loan->rejection_reason)
Rejection Reason: {{ $loan->rejection_reason }}
@endif
@if(in_array($loan->status,['approved','disbursed']))
@php $pct = $loan->amountInUsd() > 0 ? min(100,((float)$loan->amount_paid/$loan->amountInUsd())*100) : 0; @endphp
Repayment Progress
{{ round($pct) }}%
@endif