@extends('backend.partials.master') @section('title', isset($invoice) ? 'Edit Purchase Invoice' : 'Create Purchase Invoice') @section('maincontent') {{ isset($invoice) ? 'Edit Purchase Invoice' : 'New Purchase Invoice' }} @csrf @if(isset($invoice)) @method('PUT') @endif {{-- Supplier --}} Supplier * Select Supplier @foreach($suppliers as $s) supplier_id ?? '') == $s->id ? 'selected' : '' }}> {{ $s->name }} - {{ $s->company_name ?? 'N/A' }} @endforeach @error('supplier_id') {{ $message }} @enderror Lot No Invoice No Invoice Date {{-- GST State --}} GST State * gst_state ?? 'Maha') == 'Maha') ? 'checked' : '' }}> Maha gst_state ?? '') == 'Other') ? 'checked' : '' }}> Other State Upload Invoice Document (Optional) @error('invoice_document') {{ $message }} @enderror @if(isset($invoice) && $invoice->attachment) View Existing Document @endif {{-- Product Table --}} Product* HSN Quantity* GST % Rate* CGST SGST IGST Total Action @if(isset($invoice) && $invoice->products) @foreach($invoice->products as $i => $p) Select Product @foreach($products as $p2) id == $p->material_id ? 'selected' : '' }}> {{ $p2->name }} @endforeach @endforeach @else @endif Total 0.00 0.00 0.00 0.00 0.00 Add Product {{ isset($invoice) ? 'Update' : 'Save' }} Cancel @endsection @push('scripts') @endpush