@extends('layouts.admin-new') @section('content')

Loan {{ $loan->reference }}

@if ($loan->is_penalized) Penalised @endif @component('components.admin-loan-status', ['loan' => $loan]) @endcomponent @if ($loan->canBeSweptCard() || isset($loan->mandateId)) @endif @component('components.loan-statement-button', ['loan' => $loan]) @endcomponent @if ($loan->canSettle()) @endif
@include('layouts.shared.error-display')

Loaned Amount

₦{{ number_format($loan->amount, 0) }}

INSURANCE: ₦{{ number_format($loan->insurance, 2) }}

Disbursal Amount

₦{{ $loan->disbursal_amount ? number_format($loan->disbursal_amount, 2) : number_format($loan->disbursalAmount(), 2) }}

INSURANCE: ₦{{ number_format($loan->insurance, 2) }}

Loan Tenure

{{ $loan->due_date->diffInMonths($loan->created_at) }}

Months

Date Collected

{{ $loan->created_at }}

 
{{-- --}}

Due Date

{{ $loan->due_date }}

 
{{-- --}}

Payment hub

₦{{ number_format($maturity_penalty, 2) }}

{{--

₦{{ number_format($loan->user->masked_loan_wallet - array_last($excesspenalties), 2) }}

--}}
Loan Wallet: ₦{{ number_format($loan->user->loan_wallet, 2) }}
@component('components.top_wallet', ['loan' => $loan]) @endcomponent

CUSTOMER DATA

Information about the borrower

@php($user = $loan->user) @if (isset($user))

Name: {{ $user->name }}

ID: {{ $user->reference }}

Bank Name: {{ optional($user->bank)->bank_name ?? 'N/A' }}

Account Number: {{ optional($user->bank)->account_number ?? 'N/A' }}

Pay Roll ID: {{ optional($user->employments->first())->payroll_id ?? 'N/A' }}

More Details...


LOAN DOCUMENTS

User uploaded documents will show up here

@endif
@if ($loan->collection_documents) @php($documents = json_decode($loan->collection_documents)) @foreach ($documents as $name => $document) {{ ucwords(str_replace('_', ' ', $name)) }} @endforeach @else

No documents available

@endif @if ($loan->status == 2) Loan Fulfillment Doc @endif

@if ($loan->is_top_up)

View Previous loan

@endif

ADMIN ACTIONS

Actions you can perform on the loan at each stage shows up here


@component('components.admin-loan-actions', ['loan' => $loan]) @endcomponent


@if ($loan->is_penalized)
@component('components.penalty_schedule', ['loan' => $loan]) @endcomponent
{{--

Total: ₦{{ number_format($excessBalance, 2) }}

--}} @endif @if ($loan->is_penalized == 1 && count($excesspenalties) > 0)

Maturity Penalties

@foreach ($excesspenalties as $penalty) @endforeach
S/N Description Date Dr. Cr.
{{ $loop->iteration }} Total penalty due as at {{ Carbon\Carbon::parse( Carbon\Carbon::parse($loan->created_at)->addMonths($loan->duration))->addMonths($loop->iteration) }} {{ Carbon\Carbon::parse( Carbon\Carbon::parse($loan->created_at)->addMonths($loan->duration))->addMonths($loop->iteration) }} ₦{{ number_format($penalty, 2) }} ₦0.00
@endif


Loan Repayments

@if ($loan->repaymentPlans->isNotEmpty() && $loan->repaymentPlans->first()->is_new) @component('components.repayment_plans.armotised', ['loan' => $loan]) @endcomponent @else @component('components.repayment_plans.old', ['loan' => $loan]) @endcomponent @endif @foreach ($loan->repaymentPlans as $plan)
{{ csrf_field() }}
@endforeach @foreach ($loan->repaymentPlans as $plan)
{{ csrf_field() }}
@endforeach @foreach ($loan->repaymentPlans as $plan)
{{ csrf_field() }} {{ method_field('DELETE') }}
@endforeach


@component('components.loan_note', [ 'notes' => $loan->notes, 'loan' => $loan, 'user' => Auth::guard('admin')->user(), ]) @endcomponent

@component('components.loan-transactions', ['loan' => $loan]) @endcomponent

Funds for this Request ({{ $loan->loanRequest->funds()->count() }})

@forelse($loan->loanRequest->funds()->latest()->get() as $fund) @empty @endforelse
Investor Reference Investor Name Offer Fund Date
{{ $fund->investor->reference }}
{{ $fund->investor->name }}
₦ {{ $fund->amount }} ({{ $fund->percentage }}%)
{{ $fund->created_at }}
There are no funds for this Request
@endsection @section('page-js') @endsection