Invoice HSN Report

@error('start_date')
{{ $message }}
@enderror
@error('end_date')
{{ $message }}
@enderror
{{--
--}}
{{-- --}} @foreach ($invoice as $item) @foreach ($item->invoiceItems as $invoiceItem) {{-- --}} @endforeach @endforeach
Invoice ID HSN Code Invoice Date Due Date Tax Amount Total AmountStatus
{{ $item->invoice_id ?? '' }} {{ $invoiceItem->products->hsn_code ?? '' }} {{ $item->invoice_date ?? '' }} {{ $item->due_date ?? '' }} @php $totalTax = 0; if (isset($invoiceItem->invoiceItemTaxes) && $invoiceItem->invoiceItemTaxes->isNotEmpty()) { foreach ($invoiceItem->invoiceItemTaxes as $tax) { $totalTax += round(($invoiceItem->total * $tax->tax) / 100, 2); } } echo $totalTax; @endphp {{ $invoiceItem->total ?? 0 }} @php $subtotal = $invoiceItem->total ?? 0; $grandTotal = $subtotal + $totalTax; echo number_format($grandTotal, 2); @endphp {{ $statusList[$item->status] ?? 'Unknown' }}