@php $inv = $invoice ?? null; $isEdit = (bool) $inv; $formAction = $isEdit ? route('admin.invoices.update', $inv) : route('admin.invoices.store'); $formMethod = $isEdit ? 'PUT' : 'POST'; $lineItems = $lineItems ?? [['item_name' => '', 'description' => '', 'unit' => 'NOS', 'quantity' => 1, 'rate' => 0, 'discount_percent' => 0, 'tax_rate' => 0]]; $isExcise = $invoiceType === 'excise_invoice'; @endphp
@csrf @if($isEdit) @method('PUT') @endif @include('partials.admin.billing-catalog-items-json')
Add New {{ $typeLabel }}

Fill in client details, line items, and totals to generate the invoice.

@include('partials.admin.client-picker', [ 'selectedCustomerId' => old('customer_id', $inv?->customer_id ?? request('customer_id')), 'customers' => $customers, ])
@if($isExcise)
@endif
@include('partials.admin.gst-form-fields', ['inv' => $inv, 'gstEnabled' => $gstEnabled ?? false, 'indianStates' => $indianStates ?? []])
@include('partials.admin.gst-line-item-columns', ['gstEnabled' => $gstEnabled ?? false]) @if(!($gstEnabled ?? false)) @endif @foreach($lineItems as $idx => $line) @php $unitCode = $line['unit'] ?? 'NOS'; $unitMeta = collect($unitsCatalog)->firstWhere('code', $unitCode); $unitLabel = $unitMeta['label'] ?? $unitCode; @endphp @include('partials.admin.gst-line-item-cells', ['gstEnabled' => $gstEnabled ?? false, 'idx' => $idx, 'line' => $line, 'taxRates' => $taxRates]) @if(!($gstEnabled ?? false)) @endif @endforeach
No Item Name Description Unit QTY Price Disc. %TaxTotal
{{ $idx + 1 }} 1000 characters left @include('partials.admin.unit-combobox', [ 'name' => "line_items[{$idx}][unit]", 'value' => $unitCode, 'label' => $unitLabel, ]) ₹ 0.00
@php $discAllType = old('discount_all_type', $inv?->discount_all_type ?? 'percent'); $discAllVal = old('discount_all_value', $inv?->discount_all_value ?? $inv?->discount_all_percent ?? 0); @endphp
Additional options
{{-- Shipping --}}
has_shipping))>
{{-- Discount on total --}}
has_discount_total))>

By enabling this feature GSTR-1 report may not match with invoices report.

{{-- Discount to all --}}
has_discount_all))>

By enabling this feature GSTR-1 report may not match with invoices report.

{{-- Custom amount --}}
has_custom_amount))>
{{-- Advance payment --}}
has_advance_payment))> {{ old('has_advance_payment', $inv?->has_advance_payment) ? '₹ '.number_format(old('advance_payment', $inv?->advance_payment ?? 0), 2) : '' }}
{{-- Transport / E-Way --}}
has_transport_eway))>
Amount summary
Subtotal ₹ 0.00
@include('partials.admin.gst-summary-rows', ['gstEnabled' => $gstEnabled ?? false])
Excise duty (0%) ₹ 0.00
Used Advanced Payment (-) ₹ 0.00
Shipping & Packaging charges ₹ 0.00
Discount On Total (-) ₹ 0.00
Discount on all (-) ₹ 0.00
Custom Amount ₹ 0.00
Total ₹ 0
@include('partials.admin.advance-payment-modal', [ 'inv' => $inv ?? null, 'advancePaymentMethods' => $advancePaymentMethods ?? config('invoice.advance_payment_methods'), ]) {{-- Add unit modal --}} @include('partials.admin.modal-quick-client') @push('scripts') @include('partials.admin.document-form-client-scripts') @include('partials.admin.invoice-form-script') @endpush