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

LOAN REPAYMENT SCHEDULE

Loan Code

{{ $loan->loan_code }}

Client

@if($loan->individualClient) {{ $loan->individualClient->client->fullname }} @else Group Loan @endif

Total Installments

{{ $loan->installments }}

Installment Amount

{{ formatCurrencyDecimals($loan->installment_amount) }}

Total Installments

{{ $schedules->count() }}

Paid

{{ $schedules->where('status', 'paid')->count() }}

Partial

{{ $schedules->where('status', 'partial')->count() }}

Pending

{{ $schedules->where('status', 'pending')->count() }}

@forelse($schedules as $index => $schedule) @empty @endforelse
# Due Date Amount ({{getCurrencyCode()}}) Principal Paid ({{getCurrencyCode()}}) Interest Paid ({{getCurrencyCode()}}) Balance ({{getCurrencyCode()}}) Status Actions
{{ $index + 1 }} {{ $schedule->date ? $schedule->date->format('d M, Y') : 'N/A' }} {{ formatAmount($schedule->amount) }} {{ formatAmount($schedule->principal_paid ?: 0) }} {{ formatAmount($schedule->interest_paid ?: 0) }} {{ formatAmount($schedule->balance ?: 0) }} {{ ucfirst($schedule->status) }}
@if(Auth::user()->can('loans-edit')) @endif @if(Auth::user()->can('loans-delete') && $schedules->count() > 1) @endif

No repayment schedule found

This loan doesn't have a repayment schedule yet.

@if($schedules->count() > 0)
Schedule Summary
Total Amount

{{ formatCurrencyDecimals($schedules->sum('amount')) }}

Total Principal Paid

{{ formatCurrencyDecimals($schedules->sum('principal_paid')) }}

Total Interest Paid

{{ formatCurrencyDecimals($schedules->sum('interest_paid')) }}

Total Balance

{{ formatCurrencyDecimals($schedules->sum('balance')) }}

@endif
@endsection