@extends('layouts.layoutapp') @section('content')

Invoice EMI

Cancel
@foreach ($invoice_dtls as $item) @php $class = ($item->oprntl_flag == 'P' || $item->oprntl_flag == 'C') ? '#e9ecef' : ''; $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); } $penalty_amount = (int)$daysPast * $invoice->invoice_emi->penalty_amount; @endphp @endforeach
EMI Date EMI Amount Paid Date Paid Amount Due Days Penalty Discount Total Amount
oprntl_flag == 'P' || $item->oprntl_flag == 'C') ? 'disabled' : '' }}/> {{ $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 ?? '' }} {{ max((int)$daysPast ?? '', 0) }} {{ max(round($item->penalty ?? $penalty_amount, 2), 0) }} {{ $item->discount_amount ?? '' }} {{ $item->total_amount ?? '' }}
{{-- Pay Modal --}} {{-- Pre-Closure Modal --}}
@endsection @push('scripts') @endpush