✓ {{ session('success') }}
@endif
@if(session('error'))
⚠ {{ session('error') }}
@endif
{{-- EMI CARD --}}
@if($emiCard)
Card Number
{{ \App\Helpers\MoneyHelper::formatCardNumber($emiCard->card_number) }}
Available EMI Limit
{{ money((float)$emiCard->available_limit) }}
Card Limit
{{ money((float)$emiCard->card_limit) }}
Status
{{ ucfirst($emiCard->status) }}
My Loans
{{ $loans->count() }}
loan{{ $loans->count() == 1 ? '' : 's' }}
{{-- LOANS --}}
@forelse($loans as $loan)
@php
$status = strtolower((string)$loan->status);
$statusClass = match($status) {
'pending' => 'pending',
'approved' => 'approved',
'active',
'disbursed' => 'active',
'completed' => 'completed',
'closed' => 'closed',
'overdue' => 'overdue',
'rejected' => 'rejected',
'cancelled' => 'cancelled',
default => 'approved'
};
$total = (float)$loan->total_payable;
$outstanding = $status === 'rejected'
? 0
: (float)$loan->outstanding_amount;
$paid = max(
0,
$total - $outstanding
);
$percent = $total > 0
? min(
100,
max(
0,
($paid / $total) * 100
)
)
: 0;
$processingFee = (float)$loan->processing_fee;
$processingFeePaid = !is_null(
$loan->processing_fee_paid_at
);
@endphp
{{-- LOAN HEADER --}}
{{-- LOAN BASIC DETAILS --}}
{{-- REPAYMENT PROGRESS --}}
@if(
in_array(
$status,
[
'active',
'disbursed',
'overdue',
'completed'
]
)
&&
$status !== 'closed'
)
@endif
{{-- CLOSED LOAN --}}
@if($status === 'closed')
{{-- PAYMENT COMPLETE MESSAGE --}}
@if($processingFeePaid)
@endif
{{-- VIEW LOAN DETAILS --}}
@empty
{{-- EMPTY STATE --}}
Loan Number
{{ $loan->loan_number }}
{{ ucfirst(
str_replace(
'_',
' ',
$loan->status
)
) }}
Loan Amount
{{ money((float)$loan->loan_amount) }}
Monthly EMI
{{ money((float)$loan->emi_amount) }}
Tenure
{{ $loan->tenure_months }}
Months
Outstanding
{{ money($outstanding) }}
Repayment Progress
{{ number_format($percent,0) }}%
Loan Closed
Closed on
{{ $loan->closed_at?->format('d M Y') ?? '—' }}
@if($loan->close_reason)
· {{ $loan->close_reason }}
@endif
@endif
{{-- =====================================================
PROCESSING FEE STATUS
CLIENT PAYMENT OPTION REMOVED
====================================================== --}}
@if($processingFee > 0)
Processing Fee
{{ money($processingFee) }}
@if($processingFeePaid)
✓ PAYMENT COMPLETE
@else
PAYMENT PENDING
@endif
✓ Processing fee payment completed.
Paid on {{ $loan->processing_fee_paid_at->format('d M Y h:i A') }}.
Loan amount can now be credited/disbursed.
{{-- PAYMENT PENDING MESSAGE --}}
@else
Paid on {{ $loan->processing_fee_paid_at->format('d M Y h:i A') }}.
Loan amount can now be credited/disbursed.
Processing fee payment is pending.
The loan amount will be credited/disbursed only after the processing fee payment is completed.
Please contact the administrator to complete the processing fee payment.
@endif
The loan amount will be credited/disbursed only after the processing fee payment is completed.
Please contact the administrator to complete the processing fee payment.
No loans yet
@endforelse
You don't have any loan applications. Apply using your active EMI card.
@if($emiCard) Apply for a Loan @endif