@extends('admin.layouts.dashboard') @section('title', 'Create Invoice') @push('head') @include('admin.invoices._invoice-form-styles') @endpush @section('content')

Create Invoice

Back
@if($errors->any())
Please fix the following errors:
@endif
@csrf
{{-- ══════════════════════ LEFT FORM ══════════════════════ --}}
{{-- CLIENT NAME ──────────────────────────────────────── --}}
Client *
{{-- Searchable dropdown --}}
@foreach($customers as $c)
{{ $c->name }}@if($c->phone) · {{ $c->phone }}@endif
@endforeach
+ Add new client
has('customer_name')) style="display:none;"@endif>{{ $errors->first('customer_name') }}
{{-- HIDDEN CUSTOMER FIELDS ───────────────────────────── --}} {{-- INVOICE DETAILS ─────────────────────────────────── --}}
Invoice Details
{{-- Row 1: Invoice No + Invoice Amounts Are --}}
{{-- Row 2: Invoice Date + Terms + Due Date --}}
has('invoice_date')) style="display:none;"@endif>{{ $errors->first('invoice_date') }}
{{-- LINE ITEMS ───────────────────────────────────────── --}}
Invoice Items *
has('line_items')) style="display:none;"@endif>{{ $errors->first('line_items') }}
@php $liDiscLine = ($setting->discount_mode ?? 'line_item') === 'line_item'; $liTaxExclusive = old('tax_type', 'exclusive') !== 'inclusive'; @endphp @php $lineItems = old('line_items', [0 => ['description' => '', 'qty' => 1, 'rate' => 0]]); @endphp @foreach($lineItems as $i => $item) @include('admin.invoices._line-item-row', [ 'index' => $i, 'item' => $item, 'loopIndex' => $loop->iteration, ]) @endforeach
# Item Name * Unit QTY Price * Disc% GST% HST/PST% Total
{{-- SUMMARY ─────────────────────────────────────────── --}}
Summary
Subtotal$0.00
Discount -$0.00
Overall Discount -$0.00
GST $0.00
HST/PST $0.00
Rounded Off +$0.00
TOTAL $0.00
{{-- PAYMENT & STATUS ─────────────────────────────────── --}}
Payment Details
@error('payment_mode'){{ $message }}@enderror
{{-- ══════════════════════ END LEFT FORM ══════════════════ --}} {{-- ══════════════════════ RIGHT PREVIEW ════════════════════ --}}
Live Preview
{{-- Header --}}
@if($setting->logo_path) @else @endif INVOICE
NEW
Original Copy
{{-- FROM | Amount Due --}}
{{ $setting->business_name }}
{{ $setting->address }}
{{ $setting->phone }}
{{ $setting->email }}
@if($setting->website){{ $setting->website }}
@endif @include('admin.invoices.partials._tax-registration-lines')
Amount Due
$0.00
Issue Date: {{ date('M d, Y') }}
{{-- Bill To --}}
Bill To
{{-- Items --}}
# Item & Description Unit Qty Price Disc% GST HST/PST Total
No items yet
Subtotal $0.00
Discount -$0.00
Overall Discount -$0.00
GST $0.00
HST/PST $0.00
HST $0.00
Rounded Off +$0.00
TOTAL $0.00
{{-- Terms --}} @php $previewTerms = $setting->terms_conditions ?? ''; $previewTermsHtml = (strip_tags($previewTerms) === $previewTerms) ? nl2br(e($previewTerms)) : $previewTerms; @endphp @if($previewTerms)
Terms & Conditions
{!! $previewTermsHtml !!}
@else @endif
{{-- ══════════════════════ END PREVIEW ════════════════════ --}}
{{-- /inv-wrap --}}
{{-- ══════════════════════════════════════════════════════════ MODAL: Add New Customer ══════════════════════════════════════════════════════════ --}} {{-- ══════════════════════════════════════════════════════════ MODAL: Add New Product ══════════════════════════════════════════════════════════ --}} @push('scripts') @include('admin.customers._customer-validation') @include('admin.invoices._invoice-form-validation') @include('admin.customers._customer-modal-address-autocomplete') @endpush @endsection