@php
$existingItems = old('items');
if ($existingItems === null && isset($record) && $record) {
$existingItems = $record->items->map(fn($i)=>['ingredient_id'=>$i->ingredient_id,'unit_price'=>$i->unit_price,'quantity'=>$i->quantity])->values()->all();
}
$existingItems = $existingItems ?? [];
@endphp
@error('supplier_id')
{{ $message }}
@enderror
@error('purchase_date')
{{ $message }}
@enderror
@error('items')
{{ $message }}
@enderror
| SN | Ingredient(Code) | Unit Price | Quantity/Amount | Total | Actions |
|---|
NOTICE
NOTICEYou must enter the Quantity/Amount in the Unit showing just right after the Quantity/Amount field, otherwise Stock will not match.