@php $note = $debitNote ?? null; $isEdit = (bool) $note; $formAction = $isEdit ? route('admin.debit-notes.update', $note) : route('admin.debit-notes.store'); $labels = $docLabels; $lineItems = $lineItems ?? [['item_name' => '', 'description' => '', 'unit' => 'NOS', 'quantity' => 1, 'rate' => 0, 'discount_percent' => 0, 'tax_rate' => 0]]; @endphp
@csrf @if($isEdit) @method('PUT') @endif @include('partials.admin.billing-catalog-items-json')
{{ $isEdit ? 'Edit' : 'Add New' }} {{ $typeLabel }}

Select client or vendor, link the original document, and add line items.

@php $entity = old('entity_type', $entityType ?? 'client'); @endphp
@include('partials.admin.client-picker', [ 'selectedCustomerId' => old('customer_id', $note?->customer_id), 'customers' => $customers, ])
    @include('partials.admin.gst-form-fields', ['quote' => $note, 'gstEnabled' => $gstEnabled ?? false, 'indianStates' => $indianStates ?? []])
    {{ $labels['title'] }}
    @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', $note?->discount_all_type ?? 'percent'); $discAllVal = old('discount_all_value', $note?->discount_all_value ?? $note?->discount_all_percent ?? 0); @endphp
    Additional options
    has_shipping))>
    has_discount_total))>
    has_discount_all))>
    has_custom_amount))>
    has_advance_payment))> {{ old('has_advance_payment', $note?->has_advance_payment) ? '₹ '.number_format(old('advance_payment', $note?->advance_payment ?? 0), 2) : '' }}
    has_total_quantity))>
    show_cess))>
    Amount summary
    Subtotal ₹ 0.00
    @include('partials.admin.gst-summary-rows', ['gstEnabled' => $gstEnabled ?? false])
    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.modal-quick-client') @push('scripts') @include('partials.admin.document-form-client-scripts') @include('partials.admin.invoice-form-script') @endpush