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

Paid Loans

View all completed loan payments

@if (Auth::user()->can('loans-create')) Add New Loan @endif
Paid Loans
{{ $loans->count() }}
Total Amount Paid
{{ formatAmount($loans->sum('loan_amount')) }}
Interest Earned
{{ formatAmount($loans->sum('interest_amount')) }}
Avg. Interest Rate
{{ number_format($loans->avg('interest_rate'), 1) }}%

Completed Loans

All Paid
Loan Code Client(s) Type Product Principal ({{ getCurrencyCode() }}) Interest Rate Interest ({{ getCurrencyCode() }}) Total Amount ({{ getCurrencyCode() }}) Status Actions @forelse ($loans as $loan)
{{ $loan?->loan_code }}
@if ($loan?->loan_category_id == \App\Constants\LoanConstants::INDIVIDUAL_LOAN)
{{ substr(optional($loan?->individualClient)?->client?->fullname, 0, 1) }}
{{ optional($loan?->individualClient)?->client?->fullname }}
@else
@foreach ($loan?->groupClients as $index => $groupClient) @if ($index < 2)
{{ $groupClient?->client?->fullname }}
@elseif ($index == 2)
+{{ $loan?->groupClients->count() - 2 }} more
@break @endif @endforeach
@endif
{{ \App\Constants\LoanConstants::getLoanTypeName($loan?->loan_category_id) }}
{{ $loan?->loanType?->product_name }}
{{ formatAmount($loan?->principal_amount) }}
{{ $loan?->interest_rate }}%
{{ formatAmount($loan?->interest_amount) }}
{{ formatAmount($loan?->loan_amount) }}
{{ \App\Constants\LoanConstants::getStatusName($loan?->level_status_id) }} @if (Auth::user()->can('loans-show'))
@endif
@empty

No paid loans found

Loans will appear here once they are fully paid.

@endforelse
@endsection