@extends('Admin.layout') @section('content')
GA Entry
@php $remainingPrincipal = (float) ($gaCustomer->remaining_loan_amount ?? ($gaCustomer->final_loan_amount ?? 0)); // Use accrued pro-rata interest instead of full monthly due $closeInterest = (float) ($outstandingInterest ?? 0); $totalSettlementAmount = $remainingPrincipal + $closeInterest; @endphp
Full Loan Settlement Close Account

₹ {{ number_format($totalSettlementAmount, 2) }}

Remaining Principal: ₹ {{ number_format($remainingPrincipal, 2) }}
Accrued Interest (As of Today): ₹ {{ number_format($closeInterest, 2) }}
Due Date: {{ !empty($gaCustomer->next_due_date) ? \Carbon\Carbon::parse($gaCustomer->next_due_date)->format('d/m/Y') : '-' }}
Review Summary
View Details Due
Customer Name : {{ $gaCustomer->customer_name ?? '-' }}
Mobile : {{ $gaCustomer->mobile ?? '-' }}
Gross Weight : {{ number_format((float) ($gaCustomer->goldItems->sum('gross') ?? 0), 3) }} g
Net Weight : {{ number_format((float) ($gaCustomer->eligible_net_weight ?? 0), 3) }} g
@php $firstItem = $gaCustomer->goldItems->first(); $carat = $firstItem?->goldCarat; @endphp
Purity : {{ $carat->purity ?? '-' }} K
Purity Amount (per g) : ₹ {{ number_format((float) ($carat->amount ?? 0), 2) }}
Eligible Loan Amount : ₹ {{ number_format((float) ($gaCustomer->eligible_loan_amount ?? 0), 2) }}
Interest Policy : {{ $gaCustomer->policy->policy_name ?? '-' }}
Interest Rate : {{ number_format((float) ($gaCustomer->policy->interest ?? 0), 2) }}%
Disbursement Mode : {{ ucfirst(str_replace('_', ' ', $gaCustomer->disbursement_mode ?? '-')) }}
Disbursement Date : {{ !empty($gaCustomer->disbursement_date) ? \Carbon\Carbon::parse($gaCustomer->disbursement_date)->format('d/m/Y') : '-' }}
@if (!empty($gaCustomer->bank_id))
Bank Details : {{ $gaCustomer->bank->bank_name ?? '-' }}
A/c: {{ $gaCustomer->account_number ?? '-' }}
IFSC: {{ $gaCustomer->ifsc ?? '-' }}
@endif
@endsection