@extends('layouts.app') @section('title', 'Loan Arrears Report') @section('content')

Loan Arrears Report

Reset
Total Loans in Arrears: {{ $total_loans }}
Total Outstanding: Rs {{ number_format($total_outstanding, 2) }}
Avg. Days Overdue: {{ number_format($avg_overdue, 1) }} days
As of Date: {{ \Carbon\Carbon::parse($date_as_of)->format('M d, Y') }}
@foreach($rows as $row) @php $overdue_class = ''; if ($row->days_overdue >= 90) { $overdue_class = 'bg-red-600 text-white'; } elseif ($row->days_overdue >= 60) { $overdue_class = 'bg-yellow-400 text-black'; } elseif ($row->days_overdue >= 30) { $overdue_class = 'bg-blue-200 text-black'; } @endphp @endforeach
Loan ID Member NIC Branch Product Repayment Method Due Date Days Overdue Total Due (Rs.) Paid (Rs.) Status Credit Officer
{{ $row->loan_id }} {{ $row->member_name }} {{ $row->member_nic }} {{ $row->branch_name }} {{ $row->product_name }} {{ ucfirst($row->repayment_method) }} {{ \Carbon\Carbon::parse($row->due_date)->format('Y-m-d') }} {{ $row->days_overdue }} {{ number_format($row->total_due, 2) }} {{ number_format($row->paid_amount, 2) }} {{ ucfirst($row->status) }} {{ $row->credit_officer_name }}
Totals: {{ number_format($total_outstanding, 2) }}
@endsection