@php use Illuminate\Support\Facades\Storage; @endphp @extends('layouts.app') @section('title', 'Repayment Schedule') @section('page-title', 'Repayment Schedule') @section('content')
Generated on: {{ now()->format('d M Y, h:i A') }}
| Loan Number: | {{ $loan->loan_number }} |
| Customer Name: | {{ $loan->customer->name }} |
| Customer Code: | {{ $loan->customer->customer_code }} |
| Phone: | {{ $loan->customer->phone }} |
| Scheme: | {{ $loan->loanScheme?->name ?? $loan->scheme?->name ?? 'N/A' }} |
| Principal Amount: | ₹{{ number_format($loan->principal_amount, 2) }} |
| Total Loan Amount: | ₹{{ number_format($loan->total_amount, 2) }} |
| Installment Amount: | ₹{{ number_format($loan->monthly_installment, 2) }} |
| Duration: | {{ $loan->duration_value }} {{ ucfirst($loan->duration_type) }} |
| Disbursement Date: | {{ $loan->disbursement_date->format('d M Y') }} |
| Maturity Date: | {{ $loan->maturity_date->format('d M Y') }} |
| Paid Amount: | ₹{{ number_format($loan->paid_amount, 2) }} |
| Remaining Amount: | ₹{{ number_format($loan->remaining_amount, 2) }} |
| # | Due Date | Due Amount | Payment Date | Paid Amount | Remaining Balance | Status |
|---|---|---|---|---|---|---|
| {{ $installment['installment_number'] }} | {{ $installment['due_date']->format('d M Y') }} | ₹{{ number_format($installment['due_amount'], 2) }} | @if($installment['paid_date']) {{ $installment['paid_date']->format('d M Y') }} @else - @endif | @if($installment['paid_amount'] > 0) ₹{{ number_format($installment['paid_amount'], 2) }} @else - @endif | ₹{{ number_format($installment['remaining_balance'], 2) }} | @if($installment['status'] === 'paid') Paid @elseif($installment['status'] === 'overdue') Overdue @else Pending @endif |
| Total: | ₹{{ number_format($loan->total_amount, 2) }} | ₹{{ number_format($loan->paid_amount, 2) }} | ₹{{ number_format($loan->remaining_amount, 2) }} | @php $paidCount = collect($schedule)->where('status', 'paid')->count(); $overdueCount = collect($schedule)->where('status', 'overdue')->count(); $pendingCount = collect($schedule)->where('status', 'pending')->count(); @endphp Paid: {{ $paidCount }} | Overdue: {{ $overdueCount }} | Pending: {{ $pendingCount }} | ||
Loan Status: {{ ucfirst($loan->status) }}
Payment Frequency: {{ ucfirst($loan->duration_type) }}
This is a computer-generated repayment schedule.