@extends('layouts.layoutapp') @section('content')
| Branch | Invoice ID | HSN Code | Invoice Date | Due Date | Tax | Amount | Total Amount | {{--Status | --}}
|---|---|---|---|---|---|---|---|---|
| {{ $item->branch->name ?? '' }} | {{ $item->invoice_id ?? '' }} | {{ $invoiceItem->products->hsn_code ?? '-' }} | {{ \Carbon\Carbon::parse($item->invoice_date)->format('d-m-Y') ?? $item->invoice_date ?? '' }} | {{ \Carbon\Carbon::parse($item->due_date)->format('d-m-Y') ?? $item->due_date ?? '' }} | @php $totalTax = 0; if (isset($invoiceItem->invoiceItemTaxes) && $invoiceItem->invoiceItemTaxes->isNotEmpty()) { foreach ($invoiceItem->invoiceItemTaxes as $tax) { $totalTax += ($invoiceItem->total * $tax->tax) / 100; } } echo number_format(round($totalTax), 2); @endphp | {{ $invoiceItem->total ?? 0 }} | @php $subtotal = $invoiceItem->total ?? 0; $grandTotal = $subtotal + $totalTax; echo number_format(round($grandTotal), 2); @endphp | {{--{{ $statusList[$item->status] ?? 'Unknown' }} | --}}