@if($loans->isEmpty())
{{ __('No loan records') }}
@else @foreach($loans as $loan) @endforeach
{{ __('Requested') }} {{ __('Issued') }} {{ __('Principal') }} {{ __('Outstanding') }} {{ __('Installment') }} {{ __('Status') }}
{{ $loan->requested_at?->format('Y-m-d') ?? '—' }} {{ $loan->issued_at?->format('Y-m-d') ?? '—' }} {{ number_format((float) $loan->principal, 2) }} {{ number_format((float) $loan->outstanding, 2) }} @if($loan->monthly_installment) {{ number_format((float) $loan->monthly_installment, 2) }} @if($loan->loan_period_months)/ {{ $loan->loan_period_months }}{{ __('mo') }}@endif @else — @endif @if(in_array($loan->status, ['active', 'approved'], true)) {{ ucfirst($loan->status) }} @elseif($loan->status === 'pending') {{ __('Pending') }} @elseif(in_array($loan->status, ['rejected', 'cancelled'], true)) {{ ucfirst($loan->status) }} @else {{ ucfirst($loan->status ?? '—') }} @endif
@endif