@php use App\Support\LoanServiceCharge; $paidCount = $loan->installments->where('status', 'paid')->count(); $totalInst = $loan->installments->count(); $today = \Carbon\Carbon::today(); $yearlyChargePct = (float) (app(\App\Services\PfLoanService::class)->yearlyServiceChargePercent()); @endphp
| # | {{ __('Due') }} | {{ __('Principal') }} | {{ __('S/Charge') }} | {{ __('Total') }} | {{ __('Status') }} | {{ __('Paid on') }} | {{ __('Action') }} |
|---|---|---|---|---|---|---|---|
| {{ $inst->installment_no }} | {{ $dueLabel }} | {{ number_format((float) $inst->amount, 2) }} | {{ number_format($svcAmt, 2) }} | {{ number_format($totalDue, 2) }} | {{ $instStatus }} | {{ $inst->paid_at?->format('Y-m-d') ?? '—' }} | @if($inst->status === 'pending' && (float) $loan->outstanding > 0) @else — @endif |
{{ __('No installment schedule on this loan. Post a manual amount below.') }}
@endif