@extends('layouts.user') @section('content')
@if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif

Loan Details @if($loan->is_penalized) Penalised @endif @component('components.loan-status', ['loan' => $loan]) @endcomponent @component('components.loan-statement-button',['loan'=>$loan]) @endcomponent

₦ {{number_format($loan->amount, 0)}}
Loaned Amount INSURANCE: ₦{{number_format($insurance, 2)}}
{{$loan->due_date->diffInMonths($loan->created_at)}}
Loan Tenure (Months)
{{$loan->created_at}}
Loan Date
{{$loan->due_date}}
Due Date

Loan Documents

Documents you upload will show up here

@php($documents = json_decode($loan->collection_documents,true) ?? []) @if (!count($documents) > 0) @endif @foreach($documents as $name => $document) {{ ucwords(str_replace("_", " ", $name)) }} @endforeach @if($loan->status == 2) Loan Fulfillment Doc @endif
@if( $loan->canSettle())

Loan Settlement

Take settlement action here

@if(isset($loan->settlement) && $loan->settlement->status == 1) View document @elseif(isset($loan->settlement) && $loan->settlement->status == 3) View document Reason: {{$loan->settlement->status_message}} @elseif(isset($loan->settlement) && $loan->settlement->status == 2)
View document @else @endif
@endif

Management Panel

Actions you can take through the processing period of this loan will show up here

@component('components.loan-actions-customer', ['loan' => $loan]) @endcomponent
@if($loan->is_penalized) @component('components.penalty_schedule_others', ['loan'=> $loan]) @endcomponent @else
Repayment Plan
@if($loan->repaymentPlans->isNotEmpty() && $loan->repaymentPlans->first()->is_new )
EMI: {{number_format($loan->repaymentPlans->first()->emi,2)}} @php($i = 1) @foreach ($loan->repaymentPlans as $plan) @if($plan->payment_proof) @else @endif @php(++$i) @endforeach
S/N Total Amount Collected Date Amount Paid Due Date Payment Proof Payment Method Status
{{$i}} {{number_format($plan->totalAmount,2)}} {{$plan->date_paid}} @if($plan->status == 1) {{number_format($plan->paid_amount,2)}} @endif {{$plan->payday}}ViewNo proof{{$plan->collection_mode}} @if($plan->status) Paid @else Not Paid @endif
@else
@forelse($loan->repaymentPlans as $plan) @if($plan->payment_proof) @else @endif @empty @endforelse
# Total Amount Due Date Balance Collected Date Payment Proof Payment Method Status
{{$loop->iteration}} ₦{{ number_format($plan->totalAmount, 2)}} {{$plan->payday}} @if($loop->iteration === $loan->loanRequest->duration) ₦0.00 @else ₦{{ number_format($plan->balance, 2) }} @endif {{$plan->date_paid}}ViewNo proof{{$plan->collection_mode}} @if($plan->status) Paid @else Not Paid @endif
Repayments not found
@endif
@endif