@extends('adminlte::page') @section('title', 'Loans Management') @section('content_header')

Loans Management

@stop @section('content')
Loans Issued
KSh {{ number_format($loansIssued, 0) }}
Principal amount lent
Expected Repayment
KSh {{ number_format($amountExpectedRepaid, 0) }}
Total expected revenue
Total Interest/Profit
KSh {{ number_format($totalInterest, 0) }}
Revenue from lending
Pending Applications
{{ $loans->where('status', 'pending')->count() }}
Awaiting approval
Highest Loan Borrower
@if($highestLoanBorrower) {{ Str::limit($highestLoanBorrower->user->full_name, 15) }} @else No Data @endif
@if($highestLoanBorrower) KSh {{ number_format($highestLoanBorrower->amount, 0) }} @else N/A @endif
Lowest Loan Borrower
@if($lowestLoanBorrower) {{ Str::limit($lowestLoanBorrower->user->full_name, 15) }} @else No Data @endif
@if($lowestLoanBorrower) KSh {{ number_format($lowestLoanBorrower->amount, 0) }} @else N/A @endif
Highest Loan Defaulter
@if($highestDefaulter) {{ Str::limit($highestDefaulter->user->full_name, 15) }} @else No Data @endif
@if($highestDefaulter) KSh {{ number_format($highestDefaulter->balance, 0) }} @else N/A @endif
Total Defaulted Amount
KSh {{ number_format($totalDefaultedAmount, 0) }}
Outstanding balance across all loans
@forelse($loans as $loan) @empty @endforelse
ID Member Amount Rate Term Total Monthly Status Applied Actions
{{ $loan->id }}
{{ Str::limit($loan->user->full_name ?? 'N/A', 18) }}
KSh {{ number_format($loan->amount, 0) }} {{ $loan->interest_rate }}% {{ $loan->term_months }}m KSh {{ number_format($loan->total_amount, 0) }} KSh {{ number_format($loan->monthly_payment, 0) }} {{ ucfirst($loan->status) }} {{ $loan->created_at->format('d M') }}
@if($loan->status === 'pending')
@csrf @method('PATCH')
@csrf @method('PATCH')
@endif
@csrf @method('DELETE')
No Loan Applications Yet

Start by adding your first loan application to the system.

Add First Loan
@if($loans->hasPages()) @endif
@push('js') @if(session('success')) Swal.fire({ icon: 'success', title: 'Success!', text: '{{ session("success") }}', timer: 3000, showConfirmButton: false }); @endif @if(session('error')) Swal.fire({ icon: 'error', title: 'Error!', text: '{{ session("error") }}', timer: 3000, showConfirmButton: false }); @endif @endpush @stop