@extends('layouts.dashboard') @php $currency = app()->getLocale() === 'ar' ? 'ر.س' : 'SAR'; @endphp @section('title', trans('dashboard.new_quote')) @section('header_title', trans('dashboard.new_quote')) @section('content')
{{-- Top Controls Bar --}}
{{-- Breadcrumb --}}
{{-- Quote number badge --}}
{{ $nextNumber }}
{{-- Main Grid: Live Preview (Left in RTL) + Form Editor (Right in RTL) --}}
{{-- ===================================================== LEFT COLUMN (RTL): LIVE PREVIEW (معاينة حية) ====================================================== --}}

{{ trans('dashboard.live_preview') }}

QUOTATION
{{-- Paper Quotation Preview --}}
{{-- Header: Title + Dates --}}
عرض سعر
QUOTATION
{{ $nextNumber }}
{{ trans('dashboard.th_issued_at') }}: {{ now()->format('Y/m/d') }}
{{ trans('dashboard.valid_until') }}: {{ now()->addDays(14)->format('Y/m/d') }}
{{-- Emerald Accent Divider --}}
{{-- Seller & Buyer Box --}}
{{-- Seller --}}
{{ trans('dashboard.seller_label') }} (SELLER)
{{ $tenant->name }}
{{ trans('dashboard.buyer_vat') }}: {{ $tenant->vat_number }}
{{-- Buyer --}}
{{ trans('dashboard.buyer_label') }} (BUYER)
{{ trans('dashboard.walk_in_customer') }}
-
{{-- Items Table --}}
{{-- Populated dynamically --}}
{{ trans('dashboard.line_name') }} {{ trans('dashboard.qty_label') }} {{ trans('dashboard.line_price') }} {{ trans('dashboard.line_vat') }} {{ trans('dashboard.line_total_incl') }}
{{-- Totals --}}
{{ trans('dashboard.th_subtotal') }} 0.00
{{ trans('dashboard.th_vat') }} 0.00
{{-- Grand Total --}}
إجمالي العرض
QUOTATION TOTAL
0.00
{{-- Notes preview --}} {{-- Footer --}}
{{ app()->getLocale() === 'ar' ? 'جميع المبالغ بالريال السعودي' : 'All amounts in Saudi Riyal' }} () • {{ app()->getLocale() === 'ar' ? 'هذا عرض سعر وليس فاتورة ضريبية' : 'This is a quotation, not a tax invoice' }}
{{-- ===================================================== RIGHT COLUMN (RTL): FORM EDITOR ====================================================== --}}
@csrf {{-- SECTION 1: CUSTOMER (العميل) --}}

{{ trans('dashboard.nav_customers') }}

{{-- Customer Searchable Autocomplete --}}
{{-- Dropdown --}}
{{-- Selected Customer Card --}}
ع
{{ trans('dashboard.walk_in_customer') }}
عميل أفراد
{{-- Hidden form fields --}} {{-- Manual buyer fields (hidden by default) --}}
{{-- SECTION 2: LINE ITEMS (البنود) --}}

{{ trans('dashboard.line_items') }}

{{-- Saved Items Dropdown --}} @if($items->isNotEmpty())
@endif {{-- Add Line --}}
{{-- Tax Mode Switcher --}}
{{ trans('dashboard.tax_inclusive_hint') }}
{{-- Line Column Headers --}} {{-- Lines Container --}}
{{-- Totals Summary --}}
{{ trans('dashboard.th_subtotal') }} 0.00
{{ trans('dashboard.th_vat') }} 0.00
{{ trans('dashboard.total_due_label') }} 0.00
{{-- SECTION 3: DATES (التواريخ) --}}

تاريخ العرض

{{-- Issue Date --}}
{{-- Valid Until --}}
{{-- SECTION 4: NOTES (ملاحظات) --}}
{{-- SECTION 5: BOTTOM ACTION BAR --}}
{{ app()->getLocale() === 'ar' ? 'يمكن تحويل هذا العرض إلى فاتورة ضريبية عند موافقة العميل' : 'This quote can be converted to a tax invoice upon customer acceptance' }}
{{ trans('dashboard.cancel') }}
{{-- Quick Add Customer Modal --}} {{-- ========================================================= JAVASCRIPT: QUOTE REACTIVE ENGINE ========================================================== --}} @endsection