@if(!isSeller())
{!! Form::label('store_id', __('store.title1'), ['class' => 'control-label mb-2']) !!}
{!! Form::select('store_id', $stores, $result->store_id, [
'class' => 'form-control select2',
'data-actions-box' => 'true',
'data-width' => '100%',
]) !!}
@else
{!! Form::hidden('store_id', sellerId()) !!}
@endif
{{ Form::label('date', __('add_stock.date'), ['class' => 'control-label']) }}
{{ Form::text('date', dateFormat($result->adjustment_dt, SHOW_DATE), ['class' => 'form-control', 'readonly' => true]) }}
{{ Form::label('remarks', __('add_stock.remarks'), ['class' => 'control-label']) }}
{{ Form::textarea('remarks', null, ['class' => 'form-control', 'size' => '2x1']) }}
@if($result)
@endif
{{ Form::label('department_name', __('add_stock.department_name'), ['class' => 'control-label']) }}
{{ Form::label('remark', __('add_stock.item_name'), ['class' => 'control-label']) }}
{{ Form::label('quantity', __('add_stock.quantity'), ['class' => 'control-label']) }}
{{ Form::label('remarks', __('add_stock.remarks'), ['class' => 'control-label']) }}
{!! Form::hidden('delete_items', null, ['class' => '__delete_item']) !!}
@php $count = 0; @endphp
@if (isset($stockItems) && count($stockItems) > 0)
@foreach ($stockItems as $k => $item)
{{ Form::select('department_id['.$k.']', $inventoryDepartments, $item->department_id, array('class' => 'form-control item_departments select2', 'id' => 'department', 'data-live-search' => 'true','data-item_id'=>$k,'onChange'=>'itemsFilter(this)')) }}
{!! Form::hidden("stock_item_id[$k]", $item->id) !!}
@php
$invItems = $inventoryItems;
// $invItems[$item->item_id] = $item->item_name;
$invItems = array_unique($invItems);
@endphp
{{-- {!! Form::select("item[$k]", $invItems, $item->item_id, ['class' => 'form-control __item select2']) !!} --}}
{!! Form::text("quantity[$k]", $item->quantity, ['class' => 'form-control __quantity']) !!}
{!! Form::text("item_remarks[$k]", $item->remarks, ['class' => 'form-control __remarks']) !!}
@php $count++; @endphp
@endforeach
@endif