@php $isEdit = $invoice->exists; $action = $isEdit ? route('admin.invoices.update', $invoice) : route('admin.invoices.store'); $type = $invoice->type ?? 'sales'; $isSales = $type === 'sales'; $taxRate = $tax_rate ?? 14; @endphp
@csrf @if($isEdit) @method('PUT') @endif @if($errors->any())
@endif

{{ $isSales ? 'فاتورة مبيعات' : 'فاتورة مشتريات' }}

@if($isSales)
@else
@endif

البنود

@if($isEdit && $invoice->items->isNotEmpty()) @foreach($invoice->items as $i => $item) @endforeach @endif
المنتجالوصف * الكمية *السعر * خصم %ضريبة % الإجمالي
{{ number_format((float) $item->total, 2) }}
المجموع الفرعي0.00
الخصم0.00
الضريبة+ 0.00
الشحن+ 0.00
الإجمالي0.00
@push('scripts') @include('admin._partials.line_items_recalc', [ 'tableId' => 'itemsTable', 'searchUrl' => route('admin.stock.product-search'), 'taxRate' => $taxRate, 'extraFee' => 'shipping_fee', 'totShippingId' => 'totShipping', ]) @endpush