{{-- Reusable line-items table for stock operations. Required vars: $columns array of header labels in order (e.g. ['المنتج','الكمية','تكلفة','إجمالي','حذف']) $itemFields array of input names matching the columns (e.g. ['product_id','quantity','cost_price']) 'product_id' is mandatory; the rest are simple numeric inputs. $extraFields optional array of extras shown last per row before the delete button (each: ['name','type','attrs']) $tableId html id to bind JS to Pass into create.blade.php views; the JS adds/removes rows and uses Select2 AJAX picker. --}} @php $columns = $columns ?? ['المنتج', 'الكمية', 'سعر التكلفة', 'الإجمالي', '']; $tableId = $tableId ?? 'itemsTable'; $showCost = $showCost ?? true; $showActual = $showActual ?? false; $showSystem = $showSystem ?? false; @endphp
@if($showSystem)@endif @if($showCost)@endif @if(! $showActual && $showCost)@endif @if($showActual)@endif @if($showCost && ! $showActual) @endif
المنتج / variant *رصيد النظام{{ $showActual ? 'الكمية الفعلية' : 'الكمية' }} *سعر الوحدةالإجماليالفرقملاحظات
الإجمالي: 0.00
@push('scripts') @endpush