@extends('layouts.admin') @section('content')
{!! Form::model($result, [ 'route' => ['add-stock.update', $result->id], 'method' => 'POST', 'id' => 'ajaxSave', 'files' => true, ]) !!}
{{ 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->department_name) Department: {{$result->department_name}} @endif {!! Form::hidden('department',$result->department_id) !!}
--}}
{{ 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::hidden("stock_item_id[$k]", $item->id) !!} {{ Form::select('department_id['.$k.']', $inventoryDepartments, $item->department_id, array('class' => 'form-control 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::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
  • {{ Form::submit(__('common.save'), ['class' => 'btn btn-primary width80']) }}
  • {{--
  • {{ Form::reset( __('common.cancel'), array('class' => 'btn btn-default btn-lg font12'));}}
  • --}}
{{ Form::close() }}
{{ Form::select('department_id', $inventoryDepartments, '', array('class' => 'item-department','onChange'=>'itemsFilter(this)','data-item_id'=>0)) }}
{{--
{!! Form::select('item', $inventoryItems, null, ['class' => 'form-control __item']) !!}
--}}
{{-- {!! Form::select('item', $inventoryItems, null, ['class' => 'form-control __item']) !!} --}} @php $invItems = $inventoryItems; // $invItems[$item->item_id] = $item->item_name; $invItems = array_unique($invItems); @endphp
{!! Form::text('quantity', null, ['class' => 'form-control __quantity']) !!}
{!! Form::text('item_remarks', null, ['class' => 'form-control __remarks']) !!}
@endsection @section('script') @endsection