Loan terms

{{$loan->reference}} Loan#
{{number_format($loan->interest,2)}}
Interest Amount
{{$loan->created_at->toDateString()}} Released Date
{{number_format($loan->insurance,2)}} Insurance
{{$loan->due_date->toDateString()}} Maturity Date
{{number_format($loan->accruedPenalty, 2)}} Penalty Amount
Monthly Repayment Cycle
{{number_format($loan->total_amount,2)}} Total Amount Due
{{number_format($loan->amount,2)}} Principal Amount
{{number_format($loan->paid_amount,2)}} Paid Amount
@if($loan->transactions->count() > 0) {{number_format($loan->balance,2)}}   {{number_format($loan->repaymentPlans->last()->getBalanceColumnDebitOldLoans(),2)}} @else {{number_format($loan->balance,2)}} @endif Balance Amount
@component('components.loan-status',['loan'=>$loan]) @endcomponent @if ($loan->is_penalized) Penalized @endif Status

Statement of transactions

@if(count($loan->repaymentPlans) > 0) @foreach($loan->repaymentPlans as $plan) @if($plan->status ==1) @endif @if($plan->transactions->count() > 0) @foreach($plan->transactions as $tranx) @php $wallet_balance = $tranx->wallet_balance > 0 ? - $tranx->wallet_balance : abs($tranx->wallet_balance); @endphp @endforeach @endif @endforeach @endif
Date Description Debit Credit Balance
{{$loan->created_at->toDateString()}} Insurance Deducted {{number_format($loan->insurance,2)}} -{{number_format($loan->insurance,2)}}
{{$loan->created_at->toDateString()}} Insurance Paid {{number_format($loan->insurance,2)}} {{number_format(0,2)}}
{{$plan->payday}} Loan Installment {{number_format($plan->total_amount,2)}} @if($plan->status == 0) {{number_format($plan->getBalanceColumnDebitOldLoans(),2)}} @endif
{{$plan->payday}} Repayment - {{$plan->collection_mode}} {{number_format($plan->amount_paid,2)}} {{number_format($plan->getBalanceColumnCredit(),2)}}
{{$tranx->created_at->toDateString()}} {{$tranx->name}} {{$tranx->type == '1' ? number_format($tranx->amount,2) : ''}} {{$tranx->type == '2' ? number_format($tranx->amount,2) : ''}} {{number_format($wallet_balance,2)}}
Total {{number_format($loan->totalAmountLessPenalty,2)}} {{number_format($loan->paid_amount,2)}} @if($loan->transactions->count() > 0) {{number_format($loan->balanceLessPenalty,2)}}   {{number_format($loan->repaymentPlans->last()->getBalanceColumnDebitOldLoans(),2)}} @else {{number_format($loan->balanceLessPenalty,2)}} @endif