@extends("layouts.layoutapp") @section("content")
Edit Invoice
{{--
@if ($dueAmount > 0)

Due Amount:₹ {{ $dueAmount }}

@else

Due Amount:₹ {{ $dueAmount }}

@endif
--}}
@csrf
client->user->name) }}" readonly />
client->user->phone) }}" data-clientID="{{ $invoice->client->id }}" readonly />
invoice_date) }}" required /> @error("invoice_date") {{ $message }} @enderror
due_date) }}" required /> @error("due_date") {{ $message }} @enderror
@error("gst") {{ $message }} @enderror

Product Details:
{{-- --}} @php $allTaxSelections = []; foreach ($invoice->invoiceItems as $index => $item) { $allTaxSelections[$index] = $item->invoiceItemTaxes->pluck("tax_id")->toArray(); } @endphp @foreach ($invoice->invoiceItems as $index => $item) @php $product = $products->firstWhere("id", $item->product_id); $currentQty = $product ? $product->qty : 0; $taxIds = $item->invoiceItemTaxes->pluck("tax_id")->toArray(); @endphp {{-- --}} @endforeach
#Product Avl. Qty Qty Unit Price Tax Amount
{{ $index + 1 }}
@if ($branch->inv_desc_flag == "A") @endif
@if ($branch->avl_qty_flag == "A") @else @endif
@error("discount_type") {{ $message }} @enderror
discount) }}" onchange="calculateTotal()" {{ empty(old("discount_type", $invoice->discount_type)) ? "readonly" : "" }} /> @error("discount") {{ $message }} @enderror
Sub Total: {{ number_format($invoice->amount, 2) }} ₹
Discount: {{ number_format($invoice->discount, 2) }} ₹
Tax: {{ number_format($invoice->final_amount - $invoice->amount + $invoice->discount, 2) }} ₹
Total: {{ number_format($invoice->final_amount, 2) }} ₹
Previous Due: ₹ 0.00
+
Current Balance: ₹ 0.00
=
Total Balance: ₹ 0.00
Total Qty: 0

@if ($branch->loyalty_config == "A")
@endif
@php $showNote = $branch->note_flag === "A"; $showTerm = $branch->terms_flag === "A"; $buttonLabel = "Add "; if ($showNote && $showTerm) { $buttonLabel .= "Note & Term"; } elseif ($showNote) { $buttonLabel .= "Note"; } elseif ($showTerm) { $buttonLabel .= "Terms"; } @endphp @if ($showNote || $showTerm) {{--
--}} @endif
@endsection @push("scripts") @endpush