@extends('layouts.production') @section("addCss") @endsection @section('content')

{{ Trans('products.product') }} {{ Trans('products.duplicate') }}

@include('layouts.includes.message') {{Form::model($product,['method'=>'post','route'=>['product.store',$product->id],'files'=>true]) }}

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

{{ Form::label('sku', Trans('products.sku')) }} {{ Form::text('sku', "", [ 'class' => 'form-control', "required"=>"required", 'id' => "product-sku", 'placeholder' => Trans('products.sku') ])}}
{{ Form::label('name', Trans('products.name')) }} {{ Form::text('name', null, [ 'class' => 'form-control', "required"=>"required", 'placeholder' => Trans('products.name') ])}} @if($errors->first('name')) {{$errors->first('name')}} @endif
{{ Form::label('name_kh', Trans('products.name_kh')) }} {{ Form::text('name_kh', null, [ 'class' => 'form-control', 'placeholder' => Trans('products.name_kh') ])}} @if($errors->first('name_kh')) {{$errors->first('name_kh')}} @endif
{{ Form::label('price_in', Trans('products.price_in')) }}
{{getCurrencySign()}} {{ Form::number('price_in', null, [ 'class' => 'form-control', 'step' => "any", 'min' => '0', "required"=>"required", ((!isset($product)) || isset($product) && UserRole::has('change_product_price')) ? "" : "disabled", 'placeholder' => Trans('products.price_in') ])}}
{{-- Price Section --}}
{{ Form::label('price', Trans('products.price')) }}
{{getCurrencySign()}} {{ Form::number('price', null, [ 'class' => 'form-control', 'step' => "any", 'min' => '0', "required"=>"required", ((!isset($product)) || isset($product) && UserRole::has('change_product_price')) ? "" : "disabled", 'placeholder' => Trans('products.price') ])}}
{{ Form::label('price_wholesale', Trans('products.price_wholesale')) }}
{{getCurrencySign()}} {{ Form::number('price_wholesale', null, [ 'class' => 'form-control', 'step' => "any", 'min' => '0', "required"=>"required", ((!isset($product)) || isset($product) && UserRole::has('change_product_price')) ? "" : "disabled", 'placeholder' => Trans('products.price_wholesale') ])}}
{{ Form::label('discount', Trans('products.discount')) }}
% {{ Form::number('discount', "", [ 'class' => 'form-control', 'min' => '0', 'placeholder' => Trans('products.discount') ])}}
{{ Form::label('amount', Trans('products.amount')) }} {{ Form::number('amount', "", [ 'class' => 'form-control', 'min' => '1', "required"=>"required", 'placeholder' => Trans('products.amount') ])}}
{{ Form::label('min_amount', Trans('products.min_amount')) }} {{ Form::number('min_amount', "", [ 'class' => 'form-control', 'min' => '0', 'placeholder' => Trans('products.min_amount') ])}}
{{ Form::label('max_amount', Trans('products.max_amount')) }} {{ Form::number('max_amount', "", [ 'class' => 'form-control', 'min' => '0', 'placeholder' => Trans('products.max_amount') ])}}
{{ Form::label('expired_date', Trans('products.expired_date')) }}
{{ Form::text('expired_date', null, [ 'class' => "form-control", 'placeholder' => Trans('products.expired_date') ]) }}
{{ Form::label('brand_id', Trans('brands.menu')) }}
{{ Form::select('brand_id', $brands, $selected, ['class' => 'select2 form-control']) }}
{{ Form::label('unit_id', Trans('products.unit')) }}
{{ Form::select('unit_id', $units, $selected, ['class' => 'select2 form-control']) }}
{{ Form::label('product_category_id', Trans('products.product_category')) }}
{{ Form::select('product_category_id', $categories, $selected, ['class' => 'form-control select2 categories']) }}
{{ Form::label('item_location_id', Trans('products.item_location')) }}
{{ Form::select('item_location_id', $item_locations, $selected, ['class' => 'select2 form-control']) }}
{{ Form::label('supplier_id', Trans('products.supplier')) }}
{{ Form::select('supplier_id', $suppliers, $selected, ['class' => 'select2 form-control']) }}
{{ Form::label('ref_id', Trans('products.ref_id')) }} {{ Form::text('ref_id', null, [ 'class' => 'form-control', 'min' => '0', 'placeholder' => Trans('products.ref_id') ])}}
{{ Form::label('comment', Trans('products.comment')) }} {{ Form::textarea('comment', null, [ 'class' => 'form-control', 'placeholder' => Trans('products.comment'), 'rows' => '3' ])}}