TAX INVOICE

{{ $isEditing ? 'Edit Invoice #' . $invoiceNumber : 'Create Invoice' }}

{{ $isEditing ? 'Update existing tax invoice details, items, or payments' : 'Create a new GST compliant tax invoice for your customer' }}

Preview

Invoice Details

Customer Details

@if($selectedCustomer)
{{ $selectedCustomer->customer_code }} - {{ $selectedCustomer->name }}
@else @if(!empty($searchedCustomers) && $searchedCustomers->isNotEmpty())
@foreach($searchedCustomers as $sc)
{{ $sc->customer_code }} - {{ $sc->name }} {{ $sc->phone }}
Select
@endforeach
@endif @endif
@if($selectedCustomer)
{{ strtoupper(substr($selectedCustomer->name, 0, 2)) }}
{{ $selectedCustomer->name }}
{{ $selectedCustomer->phone }}
{{ $selectedCustomer->email ?? 'No email recorded' }}
View Profile →
Address {{ $selectedCustomer->address ?? 'Thrissur' }}, {{ $selectedCustomer->city ?? 'Kerala' }}
@else
Select a customer to view contact details and address.
@endif

Items

@forelse($items as $idx => $item) @php $lineSub = (float) $item['unit_price'] * (int) $item['quantity']; $lineDisc = 0.0; if (($item['discount_type'] ?? 'fixed') === 'percent') { $lineDisc = round($lineSub * (($item['discount_value'] ?? 0) / 100), 2); } else { $lineDisc = min($lineSub, (float) ($item['discount_value'] ?? 0)); } $taxable = max(0, $lineSub - $lineDisc); $taxRateP = (float) ($item['tax_rate_percent'] ?? 0); $lineTax = round($taxable * ($taxRateP / 100), 2); $lineTotal = $taxable + $lineTax; @endphp @empty @endforelse
# Item / Product HSN/SAC Qty & Unit Unit Price (₹) Discount Tax Amount (₹) Action
{{ $idx + 1 }}
@if(!empty($item['image'])) @else @endif
SKU: {{ $item['sku'] ?? 'ITEM' }} | Size: {{ $item['size'] ?? 'Standard' }}
₹{{ number_format($lineTotal, 2) }}
No items added. Click "+ Add Item" or use the search bar below to begin.
@if(!empty($quickSearchResults) && $quickSearchResults->isNotEmpty())
@foreach($quickSearchResults as $qProd)
{{ $qProd->name }} SKU: {{ $qProd->sku }} • ₹{{ number_format($qProd->sale_price, 2) }}
+ Add
@endforeach
@endif

Additional Charges (Optional)

Attachments

Invoice Summary

@php $isInter = false; if ($selectedCustomer && !empty($selectedCustomer->state)) { $isInter = strtolower(trim($selectedCustomer->state)) !== 'kerala'; } $cTaxTotal = (float)($totals['totalTax'] ?? 0); $cIgst = $isInter ? $cTaxTotal : 0.00; $cCgst = $isInter ? 0.00 : round($cTaxTotal / 2, 2); $cSgst = $isInter ? 0.00 : ($cTaxTotal - $cCgst); $cFreight = (float)($shippingCharge ?? 0); $cSubTotal = (float)($totals['taxableAmount'] ?? 0); $cGrandTotal = (float)($totals['grandTotal'] ?? 0); @endphp
@if($totals['totalDiscount'] > 0) @endif
Value GST Amount
₹{{ number_format($cSubTotal, 2) }} ₹{{ number_format($cTaxTotal, 2) }} ₹{{ number_format($cGrandTotal, 2) }}
Sub Total ₹{{ number_format($cSubTotal, 2) }}
Freight ₹{{ number_format($cFreight, 2) }}
IGST ₹{{ number_format($cIgst, 2) }}
CGST ₹{{ number_format($cCgst, 2) }}
SGST ₹{{ number_format($cSgst, 2) }}
Discount - ₹{{ number_format($totals['totalDiscount'], 2) }}
Grand Total ₹{{ number_format($cGrandTotal, 2) }}
@if($shippingCharge > 0)
Shipping / Freight Charge ₹ {{ number_format($shippingCharge, 2) }}
@endif
Round Off Adjustment
{{ $totals['roundOff'] < 0 ? '-' : '' }} ₹ {{ number_format(abs($totals['roundOff']), 2) }}

Payment Details

Advance Paid
Amount Due ₹ {{ number_format($totals['amountDue'], 2) }}

Additional Information

View / Edit
Cancel
@if($showNewCustomerModal) @endif @if($showBarcodeModal) @endif @if($showRentalModal) @endif