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

{{ $title }} : {{$proDetails['product_name']}} SKU: {{$proDetails['product_sku']}} Barcode: {{$proDetails['product_barcode']}}

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

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

{{ Form::button(' '.__('lbl.save'), ["name"=>"submit",'class' => 'btn btn-success ', 'type' => 'submit']) }} {{ __('lbl.cancel') }}

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

{{ Form::label( __('lbl.product_name') ) }} {{ Form::text('product_name', $proDetails['product_name'], ["class"=>"form-control","placeholder"=>__('lbl.product_name'),"id"=>"product_name","name"=>"product_name"]) }} @if ($errors->has('product_name')) @endif
{{ Form::label(__('lbl.product_type')) }} {{ Form::select('product_type', $product_types, $proDetails['product_type'],["class"=>"form-control","id"=>"product_type","name"=>"product_type"]) }} @if ($errors->has('product_type')) @endif
{{ Form::label(__('sel_category')) }} {{ Form::select('cat_id', $categories, $proDetails['cat_id'],['class'=>'form-control','id'=>'cat_id',"name"=>"cat_id"]) }} @if ($errors->has('cat_id')) @endif
{{ Form::label(__('lbl.product_sku') ,'',['style'=>'width:100%; clear:both']) }}
{{ Form::text('product_sku', $proDetails['product_sku'], ['readonly'=>true,"class"=>"form-control","placeholder"=>__('lbl.product_sku'),"id"=>"product_sku","name"=>"product_sku"]) }}
@if ($errors->has('product_sku')) @endif
{{ Form::label(__('lbl.product_barcode') ,'',['style'=>'width:100%; clear:both']) }}
{{ Form::text('product_barcode', $proDetails['product_barcode'], ['readonly'=>true,"class"=>"form-control","placeholder"=>__('lbl.product_barcode'),"id"=>"product_barcode","name"=>"product_barcode"]) }}
@if ($errors->has('product_barcode')) @endif
{{ Form::label(__('lbl.product_cost')) }} {{ Form::text('product_cost', $proDetails['product_cost'], ["class"=>"form-control numer_only","placeholder"=>__('lbl.product_cost'),"id"=>"product_cost","name"=>"product_cost"]) }} @if ($errors->has('product_cost')) @endif
{{ Form::label(__('lbl.product_price')) }} {{ Form::text('product_price', $proDetails['product_price'], ["class"=>"form-control numer_only","placeholder"=>__('lbl.product_price'),"id"=>"product_price","name"=>"product_price"]) }} @if ($errors->has('product_price')) @endif
{{ Form::label(__('lbl.product_color')) }} {{ Form::text('product_color', $proDetails['product_color'], ["class"=>"form-control product_color","placeholder"=>__('lbl.product_color'),"id"=>"product_color","name"=>"product_color"]) }} @if ($errors->has('product_color')) @endif
{{ Form::label(__('lbl.status')) }} {{ Form::select('product_status', $product_status, $proDetails['product_status'],["class"=>"form-control","id"=>"product_status","name"=>"product_status"]) }} @if ($errors->has('product_status')) @endif
{{ Form::label(__('lbl.product_reward')) }} {{ Form::text('product_reward', $proDetails['product_reward'], ["class"=>"form-control","placeholder"=>__('lbl.product_reward'),"id"=>"product_reward","name"=>"product_reward"]) }} @if ($errors->has('product_reward')) @endif
{{ Form::label(__('product_group')) }} {{ Form::select('product_group', $product_group, $proDetails['product_group'],['class'=>'form-control','id'=>'product_group',"name"=>"product_group"]) }} @if ($errors->has('product_group')) @endif
{{ Form::label(__('lbl.description')) }} @if ($errors->has('product_description')) @endif
{{ Form::label(__('lbl.product_image')) }} {!! Form::file('image') !!} @if ($errors->has('product_image')) @endif

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

{{ Form::label(__('lbl.tax')) }} {{ 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[]"]) }} @if ($errors->has('product_tax_group')) @endif
{{ Form::label(__('lbl.flat_tax')) }} {{ Form::text('flat_tax', $proDetails['flat_tax'], ["class"=>"form-control","placeholder"=>__('lbl.flat_tax'),"id"=>"flat_tax","name"=>"flat_tax"]) }} @if ($errors->has('flat_tax')) @endif
{{ Form::label(__('lbl.active_taxes')) }} {{ Form::text('prevailing_tax', $prevailing_tax, ["readonly", "class"=>"form-control","placeholder"=>__('lbl.prevailing_tax'),"id"=>"prevailing_tax","name"=>"prevailing_tax"]) }}
{{ Form::label(__('lbl.tax_class')) }} {{ Form::select('product_tax_class', $product_tax_class, $proDetails['product_tax_class'],[ "class"=>"form-control","id"=>"product_tax_class","name"=>"product_tax_class"]) }} @if ($errors->has('product_tax_class')) @endif

{{ __('lbl.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","placeholder"=>__('lbl.product_price'),"id"=>"product_price_custome","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

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

{{ Form::label(__('lbl.require_serial_number')) }} @if ($errors->has('require_serial_number')) @endif
{{ Form::label(__('lbl.do_not_allow')) }} @if ($errors->has('do_not_allow')) @endif
{{ Form::label(__('lbl.default_inventory')) }} @if ($errors->has('default_inventory')) @endif
{{ Form::label(__('lbl.track_in_inventory')) }} @if ($errors->has('track_in_inventory')) @endif
{{ Form::label(__('lbl.reorder_to_par')) }} @if ($errors->has('reorder_to_par')) @endif
{{ Form::label(__('lbl.tax_on_reorder')) }} @if ($errors->has('tax_on_reorder')) @endif
{{ Form::label(__('lbl.umo')) }} {{ Form::text('umo', $proDetails['umo'], ["class"=>"form-control","placeholder"=>__('lbl.umo'),"id"=>"umo","name"=>"umo"]) }} @if ($errors->has('umo')) @endif
{{ Form::label(__('lbl.bin_value')) }} {{ Form::text('bin_value', $proDetails['bin_value'], ["class"=>"form-control","placeholder"=>__('lbl.bin_value'),"id"=>"bin_value","name"=>"bin_value"]) }} @if ($errors->has('bin_value')) @endif
{{ Form::label(__('lbl.threshold')) }} {{ Form::text('threshold', $proDetails['threshold'], ["class"=>"form-control","placeholder"=>__('lbl.threshold'),"id"=>"threshold","name"=>"threshold"]) }} @if ($errors->has('threshold')) @endif
{{ Form::label(__('lbl.primary_vendor')) }} {{ Form::select('primary_vendor', $primary_vendor, $proDetails['primary_vendor'],['class'=>'form-control','id'=>'primary_vendor',"name"=>"primary_vendor"]) }} @if ($errors->has('primary_vendor')) @endif
{{ Form::label(__('lbl.vendor_item_id')) }} {{ 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"]) }} @if ($errors->has('vendor_item_id')) @endif
{{ Form::label(__('lbl.reorder_unit_type')) }} {{ 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"]) }} @if ($errors->has('reorder_unit_type')) @endif
{{ Form::label(__('lbl.default_reorder_quantity')) }} {{ 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"]) }} @if ($errors->has('default_reorder_quantity')) @endif
{{ Form::label(__('lbl.default_reorder_price')) }} {{ 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 ($errors->has('default_reorder_price')) @endif

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

@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::text('conversion', $ppo->conversion, ["class"=>"form-control","placeholder"=>__('lbl.conversion'),"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 ","id"=>"remove_stockitemedit","name"=>"remove_stockitemedit[]"]) }}
@endforeach @endif

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

{{ Form::label(__('lbl.printers')) }} {{ Form::select('printer_id', $product_printers_group, !empty($proDetails['printer_id']) ? explode(",",$proDetails['printer_id']) :'',["multiple"=>"multiple", "class"=>"form-control select2","id"=>"printer_id","name"=>"printer_id[]"]) }} @if ($errors->has('printer_id')) @endif
{{ Form::label(__('lbl.kitchen_print_name')) }} {{ Form::textarea('kitchen_print_name', $proDetails['product_print_name'], ["class"=>"form-control","rows"=>2,"placeholder"=>__('lbl.kitchen_print_name'),"id"=>"kitchen_print_name","name"=>"kitchen_print_name"]) }} @if ($errors->has('kitchen_print_name')) @endif
{{ Form::label(__('lbl.kitchen_description')) }} {{ Form::textarea('kitchen_description', $proDetails['product_kitchen_description'], ["class"=>"form-control","rows"=>2,"placeholder"=>__('lbl.kitchen_description'),"id"=>"kitchen_description","name"=>"kitchen_description"]) }} @if ($errors->has('kitchen_description')) @endif

{{ Form::button(' '.__('lbl.save'), ["name"=>"submit",'class' => 'btn btn-success', '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","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","placeholder"=>__('lbl.product_price'),"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 btn btn-danger ","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::text('conversion', '', ["class"=>"form-control","placeholder"=>__('lbl.conversion'),"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 btn btn-danger 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