@php $s = $sale ?? null; $isEdit = (bool) ($isEdit ?? false); $input = 'w-full h-11 px-3 rounded-xl border border-slate-300 dark:border-slate-700 bg-slate-50 dark:bg-slate-800 text-sm outline-none focus:ring-2 ring-brand-500 focus:bg-white dark:focus:bg-slate-900'; $label = 'block text-sm font-semibold mb-2'; // Customer na thakle (walk-in) er likha info $walk = $isEdit && ! $s->customer_id; $vName = old('customer_name', $walk && $s->customer_name !== 'Walk-in Customer' ? $s->customer_name : null); $vPhone = old('customer_phone', $walk ? $s->customer_phone : null); @endphp {{-- Breadcrumb --}}
Sales/ {{ $isEdit ? 'Edit ' . $s->invoice_no : 'New sale' }}
{{-- Errors --}} @if ($errors->any())
@endif
@csrf @if ($isEdit) @method('PUT') @endif {{-- Date + customer + customer TRN --}}
{{-- Customer + notun add --}}

Baki (due) rakhte hole customer select korte hobe. Notun customer lagle dropdown er pashe + chap. Customer TRN ei sale er jonno, invoice e customer er naam er niche boshbe. Prottek sale e alada dite parbe.

{{-- Walk-in er info (customer select korle eta bondho hoye jay) --}}
Walk-in customer er info (optional, invoice e boshbe)
{{-- Products --}}

Products

Description Qty Unit price Before VAT VAT {{ \App\Models\Sale::VAT_RATE }}% Total
{{-- Payment + totals --}}

{{ $isEdit ? 'Note' : 'Payment' }}

@if ($isEdit)
Ekhon porjonto deya taka: AED {{ number_format($s->paid_amount, 2) }}. Taka neya ba tola Payment history page theke korbe. Ekhane shudhu total bodlalei baki (due) auto bodle jabe.
@else

Kom dile baki taka Due hishebe save hobe. Pore kisti te taka nite parbe.

@endif

Summary

Grand Total (before VAT)AED 0.00
VAT ({{ \App\Models\Sale::VAT_RATE }}%)AED 0.00
Net TotalAED 0.00
@if ($isEdit)
Already paidAED {{ number_format($s->paid_amount, 2) }}
@endif
DueAED 0.00
Cancel
{{-- ============ Notun product tatkhanik add (modal) ============ --}} {{-- Notun customer popup --}} @include('admin.sales._quick-customer') @push('scripts') @endpush