@if(count($bom->bomItems) > 0)
@foreach($bom->bomItems as $index => $item)
@if($item->type == 'product')
{{ $loop->iteration }} |
{{ ($item->product->name ?? '') . ' (' . ($item->product->code ?? '') . ')' }}
|
{{ $item->unit->name ?? '-' }}
|
{{ $item->qty }}
|
₹ {{ number_format($item->unit_cost, 2) }}
|
₹ {{ number_format($item->amount, 2) }}
|
|
@else
{{ $loop->iteration }} |
{{ $item->costType->name ?? '' }}
|
{{ $item->unit->name ?? '-' }}
|
1 |
₹ {{ number_format($item->unit_cost, 2) }}
|
₹ {{ number_format($item->amount, 2) }}
|
|
@endif
@endforeach
@else
Enter BOM Items and add them... |
@endif