@php
$totalPaid = $invoice->installments->sum('amount');
$remaining = $invoice->final_amount_with_gst - $totalPaid;
// Calculate GST/IGST percentage dynamically
$taxPercentage = $invoice->tax_type === 'gst'
? ($invoice->cgst_percent + $invoice->sgst_percent)
: $invoice->igst_percent;
@endphp
Total Amount (Before Tax):
₹{{ number_format($invoice->final_amount, 2) }}
@if($invoice->tax_type === 'gst')
GST ({{ number_format($taxPercentage, 2) }}%)
@else
IGST ({{ number_format($taxPercentage, 2) }}%)
@endif:
₹{{ number_format($invoice->gst_amount, 2) }}
Total Invoice Amount (Including GST):
₹{{ number_format($invoice->final_amount_with_gst, 2) }}
Total Paid:
₹{{ number_format($totalPaid, 2) }}
Remaining:
₹{{ number_format($remaining, 2) }}
Total Amount Due (Including Tax):
₹{{ number_format($customerTotalDue, 2) }}
₹{{ number_format($invoice->final_amount_with_gst, 2) }}
Total Amount
₹{{ number_format($totalPaid, 2) }}
Total Paid
₹{{ number_format($remaining, 2) }}
Remaining