{!! Form::label('search_product', __('manufacturing::lang.select_ingredient').':') !!}
{!! Form::text('search_product', null, ['class' => 'form-control', 'id' => 'search_product', 'placeholder' => __('manufacturing::lang.select_ingredient'), 'autofocus' => true ]); !!}
{!! Form::hidden('variation_id', $variation->id); !!}
@lang('manufacturing::lang.ingredient') |
@lang('manufacturing::lang.waste_percent') |
@lang('manufacturing::lang.final_quantity') |
@lang('lang_v1.price') |
|
@php
$row_index = 0;
$ingredient_groups = [];
$ingredient_total = 0;
@endphp
@if(!empty($ingredients))
@foreach($ingredients as $ingredient)
@php
$ingredient_obj = (object) $ingredient;
$price = !empty($ingredient_obj->quantity) ? $ingredient_obj->quantity * $ingredient_obj->dpp_inc_tax : $ingredient_obj->dpp_inc_tax;
$price = $price * $ingredient_obj->multiplier;
$ingredient_total += $price;
@endphp
@if(empty($ingredient['mfg_ingredient_group_id']))
@php
$row_index = $loop->index;
@endphp
@include('manufacturing::recipe.ingredient_row', ['ingredient' => (object) $ingredient, 'ig_index' => ''])
@php
$row_index++;
@endphp
@else
@php
$ingredient_groups[$ingredient['mfg_ingredient_group_id']][] = $ingredient;
@endphp
@endif
@endforeach
@endif