Invoice EMI

Cancel
@foreach ($invoice_dtls as $item) @php $class = ($item->oprntl_flag == 'P' || $item->oprntl_flag == 'C') ? '#d9ecff' : ''; @endphp @endforeach
EMI Date EMI Amount Paid Date Paid Amount Due Days Penalty Discount Total Amount
{{$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 ?? ''}}
{{-- Pay --}} {{-- Pre-Closure --}}
@push('scripts') @endpush