Invoices
|
Payment Date
|
Amount
|
Payment Method
|
@php
$cumulativeTotal = 0; // Initialize cumulative total
@endphp
@forelse ($paymentsForInvoice as $data)
{{ $data->invoice->invoice_id }}
|
{{ \Carbon\Carbon::parse($data->payment_date)->format('d/m/Y') }}
|
{{ $data->amount }}
|
{{ \App\Models\PaymentsModel::PAYMENT_MODE[$data->payment_mode] ?? 'Unknown' }}
|
@php
// Add the current payment amount to the cumulative total
$cumulativeTotal += $data->amount;
@endphp
@empty
No Payments found.
|
@endforelse
@if($cumulativeTotal > 0)
Total Amount: |
{{ $cumulativeTotal }} |
|
@endif