|
{{$item->emi_date ? \Carbon\Carbon::parse($item->emi_date)->format('d/m/Y') :''}} |
{{ round($item->emi_amount ?? '',2) }} |
{{ $item->paid_date ? \Carbon\Carbon::parse($item->paid_date)->format('d/m/Y') :'' }} |
{{ $item->paid_amount ?? '' }} |
@php
$emiDate = \Carbon\Carbon::parse($item->emi_date);
$daysPast = 0;
if (is_null($item->paid_date)) {
$daysPast = $emiDate->isPast() ? $emiDate->diffInDays(now()) : 0;
}else{
$paidDate = \Carbon\Carbon::parse($item->paid_date);
$daysPast = $emiDate->diffInDays($paidDate, false);
}
@endphp
{{ max((int)$daysPast ?? '',0) }}
|
@php
$penalty_amount = (int)$daysPast*$item->invoice_emi->penalty_amount;
@endphp
{{ max(round( $item->penalty ?? $penalty_amount,2),0)}} |
{{ $item->discount_amount ?? '' }} |
{{$item->total_amount ?? ''}} |
@endforeach