@extends('layout.main') @section('content')

Declined Loans

Loan applications that were not approved during review

@if (Auth::user()->can('loans-create')) Add New Loan @endif
@if($loans->count() > 0)

Declined Applications Archive

{{ $loans->count() }} loan application{{ $loans->count() !== 1 ? 's' : '' }} that didn't meet approval criteria.
@endif
Declined Loans
{{ $loans->count() }}
Declined Value
{{ formatAmount($loans->sum('loan_amount')) }}
Affected Applicants
{{ $loans->where('loan_category_id', \App\Constants\LoanConstants::INDIVIDUAL_LOAN)->count() + $loans->where('loan_category_id', '!=', \App\Constants\LoanConstants::INDIVIDUAL_LOAN)->flatMap->groupClients->unique('client_id')->count() }}
Decline Rate
@php $totalApplications = $loans->count() + 50; // This would ideally come from all applications $declineRate = $loans->count() > 0 ? ($loans->count() / $totalApplications) * 100 : 0; @endphp {{ number_format($declineRate, 1) }}%

Declined Applications Record

Declined @if($loans->count() > 0) Archive of {{ $loans->count() }} rejected applications @endif
Loan Code Applicant(s) Type Product Requested ({{ getCurrencyCode() }}) Interest Rate Interest ({{ getCurrencyCode() }}) Total Requested ({{ getCurrencyCode() }}) Status Declined Date Actions @forelse ($loans as $loan)
{{ $loan?->loan_code }}
@if ($loan?->loan_category_id == \App\Constants\LoanConstants::INDIVIDUAL_LOAN)
{{ substr(optional($loan?->individualClient)?->client?->fullname, 0, 1) }}
{{ optional($loan?->individualClient)?->client?->fullname }}
Application Declined
@else
Group Application Declined
@foreach ($loan?->groupClients as $index => $groupClient) @if ($index < 2)
{{ $groupClient?->client?->fullname }}
@elseif ($index == 2)
+{{ $loan?->groupClients->count() - 2 }} more applicants
@break @endif @endforeach
@endif
{{ \App\Constants\LoanConstants::getLoanTypeName($loan?->loan_category_id) }}
{{ $loan?->loanType?->product_name }}
{{ formatAmount($loan?->principal_amount) }}
{{ $loan?->interest_rate }}%
{{ formatAmount($loan?->interest_amount) }}
{{ formatAmount($loan?->loan_amount) }}
{{ \App\Constants\LoanConstants::getStatusName($loan?->level_status_id) }}
{{ optional($loan?->updated_at)->format('M j, Y') }}
{{ optional($loan?->updated_at)->diffForHumans() }}
@if (Auth::user()->can('loans-show'))
@if (Auth::user()->can('loans-manage')) @endif
@endif
@empty

No declined loans found

Great approval rate! All applications are being accepted.

Excellent loan assessment process! 🎉
@endforelse
@endsection