{{ $invoiceId ? 'تعديل فاتورة مشتريات' : 'فاتورة مشتريات جديدة' }}

رجوع
@if (session('success'))
{{ session('success') }}
@endif
{{-- Header --}}
بيانات الفاتورة
@error('supplier_id')
{{ $message }}
@enderror
@error('branch_id')
{{ $message }}
@enderror
ج.م
{{-- Summary & Save --}}
ملخص الفاتورة
عدد الأصناف {{ count($items) }}
الإجمالي {{ number_format($this->total, 2) }} ج.م
المدفوع {{ number_format($paid, 2) }} ج.م
المتبقي {{ number_format($this->remaining, 2) }} ج.م
{{-- Items --}}
أصناف الفاتورة
@forelse($items as $i => $item) @empty @endforelse
المنتج المتغير الكمية تكلفة الوحدة تاريخ الانتهاء المجموع
@if ( $item['product_id'] && isset($productVariants[$item['product_id']]) && count($productVariants[$item['product_id']]) > 0) @else - @endif {{ number_format(($item['quantity'] ?? 0) * ($item['cost_price'] ?? 0), 2) }}
لم يتم إضافة أصناف بعد