Morio Sacco

Loan Details Report

Application #{{ $loan->id }} | Generated on {{ date('d M Y \a\t H:i') }}

Member Information
{{ strtoupper(substr($loan->user->first_name, 0, 1)) }}{{ strtoupper(substr($loan->user->second_name, 0, 1)) }}
ID: {{ $loan->user->membership->membership_number ?? 'N/A' }}
{{ $loan->user->full_name }}
Phone: {{ $loan->user->phone_number }}
Email: {{ $loan->user->email }}
ID Number: {{ $loan->user->id_number }}
Branch: {{ $loan->user->branch->name ?? 'N/A' }}
Application Date: {{ $loan->created_at->format('d M Y') }} @if($loan->approved_at) | Approved: {{ $loan->approved_at->format('d M Y') }} @endif
Status: {{ ucfirst($loan->status) }}
Loan Financial Summary
KSh {{ number_format($loan->amount, 0) }} Principal Amount
{{ $loan->interest_rate }}% Interest Rate
{{ $loan->term_months }} Term (Months)
KSh {{ number_format($loan->total_amount, 0) }} Total Amount
KSh {{ number_format($loan->monthly_payment, 0) }} Monthly Payment
KSh {{ number_format($loan->balance, 0) }} Outstanding Balance
KSh {{ number_format($loan->paid_amount, 0) }} Amount Paid
{{ number_format((($loan->total_amount - $loan->balance) / $loan->total_amount) * 100, 1) }}% Repayment Progress
@if($loan->status !== 'paid')
Repayment Progress
@endif
@if($loan->repayments->count() > 0)
Recent Repayment History
@foreach($loan->repayments->sortByDesc('created_at')->take(8) as $repayment) @endforeach
Date Amount Payment Method Status Reference
{{ $repayment->created_at->format('d M') }} KSh {{ number_format($repayment->amount, 0) }} @if($repayment->payment_method === 'mpesa_stk') M-Pesa STK @elseif($repayment->payment_method === 'mpesa_manual') M-Pesa Manual @elseif($repayment->payment_method === 'bank_transfer') Bank Transfer @else {{ ucfirst(str_replace('_', ' ', $repayment->payment_method ?? 'cash')) }} @endif {{ $repayment->status === 'completed' ? '✓' : '○' }} @if($repayment->payment_method === 'mpesa_stk' || $repayment->payment_method === 'mpesa_manual') {{ $repayment->mpesa_phone_number ?: $repayment->reference_number ?: 'N/A' }} @else {{ $repayment->reference_number ?: 'N/A' }} @endif
@if($loan->repayments->count() > 8)
... and {{ $loan->repayments->count() - 8 }} more payments
@endif
@endif @if($loan->guarantees->count() > 0)
Loan Security & Guarantees
@foreach($loan->guarantees as $guarantee)
{{ $guarantee->type_label }} {{ ucfirst($guarantee->status) }}
@if($guarantee->guarantee_type === 'guarantor') @foreach($guarantee->guarantors as $guarantor)
{{ $guarantor->guarantor->full_name }} | {{ $guarantor->relationship_label }} | Guarantee: KSh {{ number_format($guarantor->guarantee_amount, 0) }}
@if($guarantor->relationship_details)
{{ $guarantor->relationship_details }}
@endif
@endforeach @elseif($guarantee->guarantee_type === 'collateral') @foreach($guarantee->collateral as $item)
{{ $item->item_type_label }}: {{ $item->item_description }}
{{ $item->document_type_label }} #{{ $item->ownership_document_number }} | Value: KSh {{ number_format($item->estimated_value, 0) }}
@if($item->ownership_details)
{{ Str::limit($item->ownership_details, 150) }}
@endif
@endforeach @elseif($guarantee->guarantee_type === 'salary') @if($guarantee->salaryGuarantee)
{{ $guarantee->salaryGuarantee->employer_name }}
{{ $guarantee->salaryGuarantee->employer_address }} | Position: {{ $guarantee->salaryGuarantee->employee_position }}
Monthly Salary: KSh {{ number_format($guarantee->salaryGuarantee->monthly_salary, 0) }} | Since: {{ $guarantee->salaryGuarantee->employment_start_date->format('M Y') }}
✓ Employment Letter, Confirmation Letter & 2 Months Payslips Attached
@endif @endif @if($guarantee->notes)
Notes: {{ $guarantee->notes }}
@endif
@endforeach
@endif @if($loan->notes)
Additional Notes

{{ $loan->notes }}

@endif