@extends('layouts.adminLayout.admin_design') @section('content')

{{ $title }}

{{ Form::open(['url' => route('product_update', $proDetails['id']), 'method'=>'post', 'file'=>true, 'enctype'=>'multipart/form-data', 'name' => 'productconfigtab', 'id' => 'productconfigtab']) }}

{{ __('lbl.products_configuration') }}

{{ Form::button(' '.__('lbl.save'), ["name"=>"submit",'class' => 'clickbtncommon btn-sm btn btn-primary', 'type' => 'submit']) }} {{ __('lbl.cancel') }}
{{ Form::label('product_name',__('lbl.product_name'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::text('product_name', $proDetails['product_name'], ["class"=>"form-control","placeholder"=>__('lbl.product_name'),"id"=>"product_name","name"=>"product_name"]) }}
{{ Form::label('product_type',__('lbl.product_type'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::select('product_type', $product_types, $proDetails['product_type'],["class"=>"form-control","id"=>"product_type","name"=>"product_type"]) }}
{{ Form::label('sel_category',__('lbl.sel_category'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::select('cat_id', $categories, $proDetails['cat_id'],['class'=>'form-control','id'=>'cat_id',"name"=>"cat_id"]) }}
{{ Form::label('sel_category',__('lbl.sel_sub_category'), ['class' => 'col-sm-3 control-label']) }}
@if ($errors->has('sub_cat_id')) @endif
{{ Form::label('product_sku',__('lbl.product_sku'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::text('product_sku', $proDetails['product_sku'], ["class"=>"form-control","placeholder"=>__('lbl.product_sku'),"id"=>"product_sku","name"=>"product_sku"]) }}
{{ Form::label('product_barcode',__('lbl.product_barcode'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::text('product_barcode', $proDetails['product_barcode'], ['maxlength' => 20, "class"=>"form-control","placeholder"=>__('lbl.product_barcode'),"id"=>"product_barcode","name"=>"product_barcode"]) }}
{{ Form::label('product_cost',__('lbl.product_cost'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::text('product_cost', $proDetails['product_cost'], ["class"=>"form-control numer_only","placeholder"=>__('lbl.product_cost'),'maxlength' => 10,"id"=>"product_cost","name"=>"product_cost"]) }}
{{ Form::label('product_price',__('lbl.product_price'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::text('product_price', $proDetails['product_price'], ["class"=>"form-control numer_only","placeholder"=>__('lbl.product_price'),"id"=>"product_price",'maxlength' => 10,"name"=>"product_price"]) }}
{{ Form::label('product_color',__('lbl.product_color'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::text('product_color', $proDetails['product_color'], ["class"=>"form-control product_color","placeholder"=>__('lbl.product_color'),"id"=>"product_color","name"=>"product_color"]) }}
{{ Form::label('status',__('lbl.status'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::select('product_status', $product_status, $proDetails['product_status'],["class"=>"form-control","id"=>"product_status","name"=>"product_status"]) }}
{{ Form::label('product_reward',__('lbl.product_reward'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::text('product_reward', $proDetails['product_reward'], ["class"=>"form-control","placeholder"=>__('lbl.product_reward'),"id"=>"product_reward","name"=>"product_reward"]) }}
{{ Form::label('product_group',__('lbl.product_group'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::select('product_group', $product_group, $proDetails['product_group'],['class'=>'form-control','id'=>'product_group',"name"=>"product_group"]) }}
{{ Form::label('description',__('lbl.description'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::textarea('product_description', $proDetails['product_description'], ["class"=>"form-control","rows"=>2,"placeholder"=>__('lbl.description'),"id"=>"product_description","name"=>"product_description"]) }}
{{ Form::label('product_image',__('lbl.product_image'), ['class' => 'col-sm-3 control-label']) }}
{!! Form::file('image') !!} @if ($errors->has('product_image')) @endif
{{ Form::label('tax',__('lbl.tax'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::select('product_tax_group', $product_tax_group, $proDetails['product_tax_group_edit'],["multiple"=>"multiple","class"=>"form-control select2","id"=>"product_tax_group","name"=>"product_tax_group[]"]) }}
{{ Form::label('flat_tax',__('lbl.flat_tax'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::text('flat_tax', $proDetails['flat_tax'], ["class"=>"form-control","placeholder"=>__('lbl.flat_tax'),"id"=>"flat_tax","name"=>"flat_tax"]) }}
{{ Form::label('active_taxes',__('lbl.active_taxes'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::text('prevailing_tax', $prevailing_tax, ["readonly", "class"=>"form-control","placeholder"=>__('lbl.prevailing_tax'),"id"=>"prevailing_tax","name"=>"prevailing_tax"]) }}
{{ Form::label('tax_class',__('lbl.tax_class'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::select('product_tax_class', $product_tax_class, $proDetails['product_tax_class'],[ "class"=>"form-control","id"=>"product_tax_class","name"=>"product_tax_class"]) }}
@if(!empty($proDetails['product_price_options'])) @foreach($proDetails['product_price_options'] as $key => $ppo)
{{ Form::label(__('lbl.product_price_apply')) }}
{{ Form::text('product_price_time_period', $ppo->product_price_time_period,["class"=>"form-control","placeholder"=>__('product.product_price_apply'),"id"=>"reservationtime","name"=>"product_price_time_period[]"]) }} @if ($errors->has('product_price_time_period')) @endif
{{ Form::label(__('lbl.product_price_tire')) }} {{ Form::select('product_price_tires', $product_price_tires, $ppo->prices_id,['class'=>'form-control','id'=>'product_price_tires',"name"=>"product_price_tires[]"]) }} @if ($errors->has('product_price_tires')) @endif
{{ Form::label(__('lbl.product_price')) }} {{ Form::text('product_price_custome', $ppo->product_price_custome, ["class"=>"form-control numer_only","placeholder"=>__('lbl.product_price'),"id"=>"product_price_custome",'maxlength' => 10,"name"=>"product_price_custome[]"]) }} @if ($errors->has('product_price_custome')) @endif
{{ Form::label(__('lbl.action')) }}
{{ Form::button(' Remove', ["style"=>"width:50%","data-id"=>$key+1,"class"=>"remove_edititem form-control btn btn-danger","id"=>"item_remove","name"=>"item_remove[]"]) }}
@endforeach @endif
{{ Form::label('require_serial_number', __('lbl.require_serial_number'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::label('do_not_allow', __('lbl.do_not_allow'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::label('default_inventory', __('lbl.default_inventory'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::label('track_in_inventory', __('lbl.track_in_inventory'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::label('reorder_to_par', __('lbl.reorder_to_par'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::label('tax_on_reorder', __('lbl.tax_on_reorder'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::label('umo', __('lbl.umo'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::text('uom', $proDetails['uom'], ["class"=>"form-control", 'readonly','maxlength' => 50 ,"placeholder"=>__('lbl.umo'),"id"=>"uom","name"=>"uom"]) }} =={{ Form::label('umo', __('lbl.uom_tooltip_message'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::label('bin_value', __('lbl.bin_value'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::text('bin_value', $proDetails['bin_value'], ["class"=>"form-control","placeholder"=>__('lbl.bin_value'),"id"=>"bin_value","name"=>"bin_value"]) }}
{{ Form::label('threshold', __('lbl.threshold'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::text('threshold', $proDetails['threshold'], ["class"=>"form-control","placeholder"=>__('lbl.threshold'),"id"=>"threshold","name"=>"threshold"]) }}
{{ Form::label('primary_vendor', __('lbl.primary_vendor'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::select('primary_vendor', $primary_vendor, $proDetails['primary_vendor'],['class'=>'form-control','id'=>'primary_vendor',"name"=>"primary_vendor"]) }}
{{ Form::label('vendor_item_id', __('lbl.vendor_item_id'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::text('vendor_item_id', $proDetails['vendor_item_id'], ["class"=>"form-control","placeholder"=>__('lbl.vendor_item_id'),"id"=>"vendor_item_id","name"=>"vendor_item_id"]) }}
{{ Form::label('reorder_unit_type', __('lbl.reorder_unit_type'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::text('reorder_unit_type', $proDetails['reorder_unit_type'], ["class"=>"form-control","placeholder"=>__('lbl.reorder_unit_type'),"id"=>"reorder_unit_type","name"=>"reorder_unit_type"]) }}
{{ Form::label('default_reorder_quantity', __('lbl.default_reorder_quantity'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::text('default_reorder_quantity', $proDetails['default_reorder_quantity'], ["class"=>"form-control","placeholder"=>__('lbl.default_reorder_quantity'),"id"=>"default_reorder_quantity","name"=>"default_reorder_quantity"]) }}
{{ Form::label('default_reorder_price', __('lbl.default_reorder_price'), ['class' => 'col-sm-3 control-label']) }}
{{ Form::text('default_reorder_price', $proDetails['default_reorder_price'], ["class"=>"form-control","placeholder"=>__('lbl.default_reorder_price'),"id"=>"default_reorder_price","name"=>"default_reorder_price"]) }}
@if(!empty($proDetails['product_stock_units'])) @foreach($proDetails['product_stock_units'] as $key => $ppo)
{{ Form::label(__('lbl.name')) }} {{ Form::text('unit', $ppo->unit_name, ["class"=>"form-control","placeholder"=>__('lbl.name'),"id"=>"unit_name","name"=>"unit_name[]"]) }} @if ($errors->has('unit')) @endif
{{ Form::label(__('lbl.conversion')) }} {{ Form::number('conversion', $ppo->conversion, ["class"=>"form-control","placeholder"=>__('lbl.conversion'), 'min' => 1, 'max' => 9999, "id"=>"conversion","name"=>"conversion[]"]) }} @if ($errors->has('conversion')) @endif
{{ Form::label(__('lbl.barcode')) }} {{ Form::text('barcode', $ppo->barcode, ["class"=>"form-control","placeholder"=>__('lbl.barcode'),"id"=>"barcode","name"=>"barcode[]"]) }} @if ($errors->has('barcode')) @endif
{{ Form::label(__('lbl.unit')) }} {{ Form::select('unit', $inventory_unit, $ppo->unit,['class'=>'form-control','id'=>'unit',"name"=>"unit[]"]) }} @if ($errors->has('unit')) @endif
{{ Form::label(__('lbl.active')) }}
{{ Form::select('inv_active[]', ['YES'=>'YES','NO'=>'NO'], $ppo->inv_active,['class'=>'form-control','id'=>'inv_active',"name"=>"inv_active[]"]) }} @if ($errors->has('inv_active')) @endif
{{ Form::label(__('lbl.primary')) }}
{{ Form::select('primary[]', ['YES'=>'YES','NO'=>'NO'], $ppo->primary,['class'=>'form-control','id'=>'primary']) }} @if ($errors->has('primary')) @endif
{{ Form::label(__('lbl.action')) }}
{{ Form::button(' Remove', ["data-id"=>$key+1,"class"=>"form-control btn btn-danger remove_stockitemedit btn-sm","id"=>"remove_stockitemedit","name"=>"remove_stockitemedit[]"]) }}
@endforeach @endif

{{ Form::button(' '.__('lbl.save'), ["name"=>"submit",'class' => 'clickbtncommon btn-sm btn btn-primary', 'type' => 'submit']) }} {{ __('lbl.cancel') }}
{{ Form::hidden('old_sub_cat_id', $proDetails['sub_cat_id'], ['id' => 'old_sub_cat_id']) }} {{ Form::hidden('takenBy', 0, ['id' => 'takenBy']) }} {{ Form::hidden('product_image_file_old', $proDetails['product_image_file'], ['id'=> 'product_image_file_old']) }} {{ Form::close() }}
{{ Form::label(__('lbl.product_price_apply')) }}
{{ Form::text('product_price_time_period', '',["class"=>"form-control reservationtime mxlen_23","placeholder"=>__('product.product_price_apply'),"id"=>"reservationtime","name"=>"product_price_time_period[]"]) }} @if ($errors->has('product_price_time_period')) @endif
{{ Form::label(__('lbl.product_price_tire')) }} {{ Form::select('product_price_tires', $product_price_tires, '',['class'=>'form-control','id'=>'product_price_tires',"name"=>"product_price_tires[]"]) }} @if ($errors->has('product_price_tires')) @endif
{{ Form::label(__('lbl.product_price')) }} {{ Form::text('product_price_custome', '', ["class"=>"form-control numer_only","placeholder"=>__('lbl.product_price'), 'maxlength' => 10 ,"id"=>"product_price_custome","name"=>"product_price_custome[]"]) }} @if ($errors->has('product_price_custome')) @endif
{{ Form::label(__('lbl.action')) }}
{{ Form::button(' Remove', ["name"=>"remove_edititem","style"=>"width:50%","class"=>"remove_edititem form-control clickbtncommon btn-sm btn btn-primary ","id"=>"remove_edititem","name"=>"remove_edititem[]"]) }}
{{ Form::label(__('lbl.name')) }} {{ Form::text('unit', '', ["class"=>"form-control","placeholder"=>__('lbl.name'),"id"=>"unit_name","name"=>"unit_name[]"]) }} @if ($errors->has('unit')) @endif
{{ Form::label(__('lbl.conversion')) }} {{ Form::number('conversion', '', ["class"=>"form-control","placeholder"=>__('lbl.conversion'), 'min' => 1, 'max' => 9999, "id"=>"conversion","name"=>"conversion[]"]) }} @if ($errors->has('conversion')) @endif
{{ Form::label(__('lbl.barcode')) }} {{ Form::text('barcode', '', ["class"=>"form-control","placeholder"=>__('lbl.barcode'),"id"=>"barcode","name"=>"barcode[]"]) }} @if ($errors->has('barcode')) @endif
{{ Form::label(__('lbl.unit')) }} {{ Form::select('unit', $inventory_unit, '',['class'=>'form-control','id'=>'unit',"name"=>"unit[]"]) }} @if ($errors->has('unit')) @endif
{{ Form::label(__('lbl.active')) }}
{{ Form::select('inv_active[]', ['YES'=>'YES','NO'=>'NO'], 'YES',['class'=>'form-control','id'=>'inv_active',"name"=>"inv_active[]"]) }} @if ($errors->has('inv_active')) @endif
{{ Form::label(__('lbl.primary')) }}
{{ Form::select('primary[]', ['YES'=>'YES','NO'=>'NO'], 'YES',['class'=>'form-control','id'=>'primary']) }} @if ($errors->has('primary')) @endif
{{ Form::label(__('lbl.action')) }}
{{ Form::button(' Remove', ["class"=>"form-control clickbtncommon btn-sm btn btn-primary remove_stockitemedit","id"=>"remove_stockitemedit","name"=>"remove_stockitemedit[]"]) }}
@endsection @section('pagescript') {!! Helper::pagejs([ 'js/lib/select2/dist/js/select2.full.min.js', 'js/lib/moment/min/moment.min.js', 'js/lib/bootstrap-daterangepicker/daterangepicker.js', 'js/lib/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js', 'js/lib/bootstrap-colorpicker/dist/js/bootstrap-colorpicker.min.js', 'js/lib/plugins/timepicker/bootstrap-timepicker.min.js', 'js/backend/products/add_edit.js' ]) !!} @stop