{{trans('products.general_product_details')}}
{{ Form::label( 'name', trans('products.name'),['class' => 'col control-label']) }}
{{ Form::text('name', null, ['class' => 'form-control box-size', 'placeholder' => trans('products.name').'*','required'=>'required']) }}
{{ Form::label( 'taxrate', trans('products.taxrate'),['class' => 'col control-label']) }}
{{ Form::text('taxrate', numberFormat(@$products['taxrate']), ['class' => 'form-control box-size', 'placeholder' => trans('products.taxrate'),'onkeypress'=>"return isNumber(event)"]) }}
{{ Form::label( 'product_des', trans('products.product_des'),['class' => 'col control-label']) }}
{{ Form::textarea('product_des', null, ['class' => 'form-control box-size', 'rows'=>2, 'placeholder' => trans('products.product_des')]) }}
{{ Form::label( 'code_type', trans('products.code_type'),['class' => 'col control-label']) }}
{{ Form::label( 'unit', trans('products.stock_type'),['class' => 'col control-label']) }}
{{ Form::label( 'productcategory_id', trans('products.productcategory_id'),['class' => 'col control-label']) }}
{{ Form::label( 'sub_cat_id', trans('products.sub_cat_id'),['class' => 'col control-label']) }}
{{ Form::label( 'unit', trans('products.unit'),['class' => 'col control-label']) }}

{{trans('products.standard_details')}}
{{ Form::label( 'variation_name', trans('general.description'),['class' => 'col control-label']) }}
{{ Form::text('variation_name[]',@$products->standard['name'], ['class' => 'form-control box-size', 'placeholder' => trans('general.description')]) }}
{{ Form::label( 'price', trans('products.price'),['class' => 'col control-label']) }}
{{ Form::text('price[]', numberFormat(@$products->standard['price']), ['class' => 'form-control box-size', 'placeholder' => trans('products.price').'*','required'=>'required','onkeypress'=>"return isNumber(event)"]) }}
{{ Form::label( 'purchase_price', trans('products.purchase_price'),['class' => 'col control-label']) }}
{{ Form::text('purchase_price[]', numberFormat(@$products->standard['purchase_price']), ['class' => 'form-control box-size', 'placeholder' => trans('products.purchase_price'),'onkeypress'=>"return isNumber(event)"]) }}
{{ Form::label( 'qty', trans('products.qty'),['class' => 'col control-label']) }}
{{ Form::text('qty[]', numberFormat(@$products->standard['qty']), ['class' => 'form-control box-size', 'placeholder' => trans('products.qty'),'onkeypress'=>"return isNumber(event)"]) }}
{{ Form::label( 'productcategory_id', trans('products.warehouse_id'),['class' => 'col control-label']) }}
{{ Form::label( 'code', trans('products.code'),['class' => 'col control-label']) }}
{{ Form::text('code[]', @$products->standard['code'], ['class' => 'form-control box-size', 'placeholder' => trans('products.code')]) }}
{{ Form::label( 'barcode', trans('products.barcode'),['class' => 'col control-label']) }}
{{ Form::text('barcode[]', @$products->standard['barcode'], ['class' => 'form-control box-size', 'placeholder' => trans('products.barcode')]) }}
{{ Form::label( 'disrate', trans('products.disrate'),['class' => 'col control-label']) }}
{{ Form::text('disrate[]', numberFormat(@$products->standard['disrate']), ['class' => 'form-control box-size', 'placeholder' => trans('products.disrate'),'onkeypress'=>"return isNumber(event)"]) }}
{{ Form::label( 'alert', trans('products.alert'),['class' => 'col control-label']) }}
{{ Form::text('alert[]', numberFormat(@$products->standard['alert']), ['class' => 'form-control box-size', 'placeholder' => trans('products.alert'),'onkeypress'=>"return isNumber(event)"]) }}
{{ Form::label( 'expiry', trans('products.expiry'),['class' => 'col control-label']) }}
@if(@$products->standard['expiry']!='0000-00-00') {{ Form::text('expiry[]', dateFormat(@$products->standard['expiry']), ['class' => 'form-control box-size', 'placeholder' => trans('products.expiry'),'data-toggle'=>'datepicker','autocomplete'=>'false']) }} @else {{ Form::hidden('expiry[]', '0000-00-00') }} Not Applicable @endif
{{ Form::label( 'image', trans('products.image'),['class' => 'col control-label']) }}
{!! Form::file('image[]', array('class'=>'input' )) !!}

@if(isset($products->standard->product_serial)) @foreach($products->standard->product_serial as $serial)
@endforeach @endif @if(isset($products->variations[0]))

{{trans('products.variation')}}

@foreach($products->variations as $row)
{{trans('general.description')}}
{{ Form::label( 'price', trans('products.price'),['class' => 'col control-label']) }}
{{ Form::text('price[]', numberFormat(@$row->price), ['class' => 'form-control box-size', 'placeholder' => trans('products.price'),'onkeypress'=>"return isNumber(event)"]) }}
{{ Form::label( 'purchase_price', trans('products.purchase_price'),['class' => 'col control-label']) }}
{{ Form::text('purchase_price[]', numberFormat(@$row->purchase_price), ['class' => 'form-control box-size', 'placeholder' => trans('products.purchase_price'),'onkeypress'=>"return isNumber(event)"]) }}
{{ Form::label( 'qty', trans('products.qty'),['class' => 'col control-label']) }}
{{ Form::text('qty[]', numberFormat(@$row->qty), ['class' => 'form-control box-size', 'placeholder' => trans('products.qty'),'onkeypress'=>"return isNumber(event)"]) }}
{{ Form::label( 'productcategory_id', trans('products.warehouse_id'),['class' => 'col control-label']) }}
{{ Form::label( 'code', trans('products.code'),['class' => 'col control-label']) }}
{{ Form::text('code[]', @$row->code, ['class' => 'form-control box-size', 'placeholder' => trans('products.code')]) }}
{{ Form::label( 'barcode', trans('products.barcode'),['class' => 'col control-label']) }}
{{ Form::text('barcode[]', $row->barcode, ['class' => 'form-control box-size', 'placeholder' => trans('products.barcode')]) }}
{{ Form::label( 'disrate', trans('products.disrate'),['class' => 'col control-label']) }}
{{ Form::text('disrate[]', numberFormat(@$row->disrate), ['class' => 'form-control box-size', 'placeholder' => trans('products.disrate'),'onkeypress'=>"return isNumber(event)"]) }}
{{ Form::label( 'alert', trans('products.alert'),['class' => 'col control-label']) }}
{{ Form::text('alert[]', numberFormat(@$row->alert), ['class' => 'form-control box-size', 'placeholder' => trans('products.alert'),'onkeypress'=>"return isNumber(event)"]) }}
{{ Form::label( 'expiry', trans('products.expiry'),['class' => 'col control-label']) }}
{{ Form::text('expiry[]', dateFormat(@$row->expiry), ['class' => 'form-control box-size', 'placeholder' => trans('products.expiry')]) }}
{{ Form::label( 'image', trans('products.image'),['class' => 'col control-label']) }}
{!! Form::file('image[]', array('class'=>'input' )) !!}
@endforeach
@endif
{{trans('products.variation')}}
@section("after-styles") {!! Html::style('focus/css/select2.min.css') !!} @endsection @section("after-scripts") {{ Html::script('focus/js/select2.min.js') }} @endsection