@php $isEdit = !empty($record); $existingItems = old('items', $isEdit ? $record->items->map(fn($r)=>['ingredient_id'=>$r->ingredient_id,'quantity'=>$r->quantity])->values()->all() : []); @endphp

{{ $isEdit ? 'Edit Waste' : 'Add Waste' }}

@csrf @if($isEdit) @method('PUT') @endif
@error('reference_no')
{{ $message }}
@enderror
@error('waste_date')
{{ $message }}
@enderror
@error('responsible_person_id')
{{ $message }}
@enderror
SNIngredient(Code)Quantity/AmountLoss AmountActions
Back
NOTICE
NOTICE
You must enter the Quantity/Amount in the Unit showing just right after the Quantity/Amount field, otherwise Stock will not match.
Click Here to know measurement of specific ingredient, something like: 1 Cup Soya Bean Oil=240 ml, 1 Cup Wheat Flour=100.8 g, 1 Tablespoon Chopped Pepper=10.8 g.

And those you can not measure in this way. Like you buy 1 packet Chaomin, then divide that by how many you can make by 1 packet. Something like you buy 1 packet Chaomin, that's weight is 500 g and you can make 4 dishes. Then enter the consumption 125 g (500 g / 4 dish=125 g).
NB: These are just example, calculate the consumption by your own.