@extends('layouts.app') @section('title', 'فاتورة جديدة - '.config('app.name')) @section('breadcrumb') الرئيسية المبيعات الفواتير فاتورة جديدة @endsection @section('content') @php $invoiceCustomerOptions = $customers->map(fn ($c) => [ 'value' => $c->id, 'label' => (string) ($c->display_name ?? $c->name ?? ''), ])->all(); @endphp
{{-- عنوان الصفحة + رجوع للقائمة فقط؛ الحفظ مرة واحدة في أسفل النموذج --}}

فاتورة جديدة

قائمة الفواتير
@csrf @if(!empty($fromQuotationId)) @endif @if(!empty($fromSalesOrderId)) @else @endif {{-- تفاصيل الفاتورة --}}

تفاصيل الفاتورة

@error('customer_id')

{{ $message }}

@enderror
تاريخ الإصدار @error('date')

{{ $message }}

@enderror
تاريخ الاستحقاق * @error('due_date')

{{ $message }}

@enderror
{{-- بنود الفاتورة --}}

بنود الفاتورة

المنتج الكمية سعر الوحدة الخصم % الضريبة % إجمالي البند
@php $invoiceLineErrorKeys = collect($errors->keys())->filter(fn ($k) => $k === 'lines' || str_starts_with((string) $k, 'lines.')); @endphp @if ($invoiceLineErrorKeys->isNotEmpty())
@foreach ($invoiceLineErrorKeys as $errKey) @foreach ($errors->get($errKey) as $msg)

{{ $msg }}

@endforeach @endforeach
@endif {{-- ملخص الحسابات --}}
المجموع الفرعي
الخصم
الضريبة
الإجمالي
{{-- ملاحظات وتذييل --}}
إلغاء
@endsection