@php /** @var array|bool $mixin */ $mixin = $mixin ?? []; // if item exists, input prefix will be "items[{item->id}]" // if not, it will be null and will be added by javascript later $inputPrefix = 'items[' . ($mixin ? $id : 'new') . ']'; $disabled = $mixin ? '' : 'disabled'; @endphp {!! Form::select("{$inputPrefix}[stock_item_id]", $items, array_get($mixin, 'stock_item_id'), ['class' => 'form-control item', $disabled]) !!}
{!! Form::number("{$inputPrefix}[quantity]", ($mixin ? array_get($mixin, 'quantity') : 1), ['class' => 'form-control change', 'step' => '0.001', $disabled]) !!} {{ array_get($mixin, 'transUom') ?? '?' }}
{!! Form::number("{$inputPrefix}[total_net_rolling_avg_price]", ($mixin ? array_get($mixin, 'total_net_rolling_avg_price') : 1), ['class' => 'form-control total_net_rolling_avg_price', 'disabled' => 1]) !!}