@extends('layouts.app') @section('content')

Record Loan Repayment

Repayment Details
@csrf
$
@error('amount')
{{ $message }}
@enderror Maximum allowed: ${{ number_format($remainingBalance, 2) }}
@error('repayment_date')
{{ $message }}
@enderror
@error('payment_method')
{{ $message }}
@enderror
@error('notes')
{{ $message }}
@enderror
Cancel
Loan Summary
Loan Number: {{ $loan->loan_number }}
Borrower:
@if($loan->client)
{{ $loan->client->first_name }} {{ $loan->client->last_name }}
{{ $loan->client->client_number }} @else Client not found @endif
Loan Amount: ${{ number_format($loan->amount, 2) }}
Total Repayment: ${{ number_format($loan->total_repayment, 2) }}
Total Paid: ${{ number_format($totalPaid, 2) }}
Outstanding Balance: ${{ number_format($loan->outstanding_balance, 2) }}
Remaining Balance: ${{ number_format($remainingBalance, 2) }}

Next Due Date: {{ $nextDueDate ? $nextDueDate->format('M d, Y') : 'N/A' }}
Repayment Progress {{ number_format(($totalPaid / $loan->total_repayment) * 100, 1) }}%
@endsection @push('styles') @endpush @push('scripts') @endpush