@extends('layouts.app') @section('content')
@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif

Loan Management

Review applications, manage approvals and monitor active loans.

@csrf
Total Loans
{{ number_format($totalLoans) }}
All applications
Pending
{{ number_format($pendingLoans) }}
Awaiting review
Approved
{{ number_format($approvedLoans) }}
Ready to disburse
Active
{{ number_format($activeLoans) }}
Currently running
Overdue
{{ number_format($overdueLoans) }}
Needs attention
Completed
{{ number_format($completedLoans) }}
Successfully closed
Total Disbursed
₹{{ number_format((float)$totalDisbursed,2) }}
Disbursed, active and completed loans
Total Outstanding
₹{{ number_format((float)$totalOutstanding,2) }}
Current outstanding balance
@if(request()->filled('search') || request()->filled('status')) Clear @endif
@if($loans->count())
@foreach($loans as $loan) @php $clientName = $loan->user->name ?? 'Unknown Client'; $initial = strtoupper(substr($clientName,0,1)); $statusClass = match($loan->status) { 'pending'=>'status-pending','approved'=>'status-approved','disbursed'=>'status-disbursed','active'=>'status-active', 'overdue'=>'status-overdue','completed'=>'status-completed','rejected'=>'status-rejected','cancelled'=>'status-cancelled', default=>'status-pending' }; @endphp @endforeach
LoanClientLoan AmountChargesEMITenureOutstandingStatusAppliedAction
{{ $loan->loan_number }}
Card: {{ $loan->emiCard->card_number ?? '—' }}
{{ $initial }}
{{ $clientName }}
{{ $loan->user->mobile ?? $loan->user->email ?? '—' }}
₹{{ number_format((float)$loan->loan_amount,2) }}
Total: ₹{{ number_format((float)$loan->total_payable,2) }}
{{ number_format((float)$loan->interest_rate,2) }}% Interest
Fee: ₹{{ number_format((float)$loan->processing_fee,2) }}
₹{{ number_format((float)$loan->emi_amount,2) }}
Monthly
{{ $loan->tenure_months }}
months
₹{{ number_format((float)$loan->outstanding_amount,2) }}
{{ ucfirst($loan->status) }}
{{ optional($loan->applied_at)->format('d M Y') ?? optional($loan->created_at)->format('d M Y') }}
{{ optional($loan->created_at)->format('h:i A') }}
@if($loan->status === 'pending')
@csrf
@csrf
@elseif($loan->status === 'approved')
@csrf
@endif
Showing {{ $loans->firstItem() }} - {{ $loans->lastItem() }} of {{ $loans->total() }}
{{ $loans->links() }}
@else
No loans found There are no loan records matching your current filters.
@endif
@endsection