@lang('system/sys_customer.document_title')

@include('flash::message')

@lang('general.text_add')

{!! Form::open(['route' => 'sys-customers.store','method' => 'POST','class' => 'form-horizontal','role' => 'form','id'=>'form']) !!} {!! Form::hidden('domain', old('domain',config('app.tenant_base_url'))) !!}
{!! html_entity_decode(Form::label('name', __('system/sys_customer.entry_name') . ' *', ['class' => 'col-md-3 col-xs-12 control-label'])) !!}
{!! Form::text('name', old('name'), ['class' => 'form-control', 'placeholder' => __('system/sys_customer.entry_name'),'required','autofocus','maxlength' => '200']) !!} @if ($errors->has('name')) {{ $errors->first('name') }} @endif
{!! html_entity_decode(Form::label('taxid', __('system/sys_customer.entry_taxid') . ' *', ['class' => 'col-md-3 col-xs-12 control-label'])) !!}
{!! Form::text('taxid', old('taxid'), ['class' => 'form-control', 'placeholder' => __('system/sys_customer.entry_taxid'),'required','maxlength' => '13', 'style' => 'text-transform:uppercase;']) !!} @if ($errors->has('taxid')) {{ $errors->first('taxid') }} @endif
{!! html_entity_decode(Form::label('name_user', __('system/sys_customer.entry_name_user') . ' *', ['class' => 'col-md-3 col-xs-12 control-label'])) !!}
{!! Form::text('name_user', old('name_user'), ['class' => 'form-control', 'placeholder' => __('system/sys_customer.entry_name_user'),'required','maxlength' => '200']) !!} @if ($errors->has('name_user')) {{ $errors->first('name_user') }} @endif
{!! html_entity_decode(Form::label('email', __('system/sys_customer.entry_email') . ' *', ['class' => 'col-md-3 col-xs-12 control-label'])) !!}
{!! Form::email('email', old('email'), ['class' => 'form-control', 'placeholder' => __('system/sys_customer.entry_email'),'required','maxlength' => '100']) !!} @if ($errors->has('email')) {{ $errors->first('email') }} @endif
{!! html_entity_decode(Form::label('phone', __('system/sys_customer.entry_phone') . '', ['class' => 'col-md-3 col-xs-12 control-label'])) !!}
{!! Form::text('phone', old('phone'), ['class' => 'form-control', 'placeholder' => __('system/sys_customer.entry_phone'),'maxlength' => '100']) !!} @if ($errors->has('phone')) {{ $errors->first('phone') }} @endif
@if(Auth::user()->superadmin)
{!! html_entity_decode(Form::label('distributor_id', __('sales/customer_invoice.entry_distributor_id') . '', ['class' => 'col-md-3 col-xs-12 control-label'])) !!}
{!! Form::select('distributor_id', $distributors,old('distributor_id'), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!} @if ($errors->has('distributor_id')) {{ $errors->first('distributor_id') }} @endif
@endif
{!! Form::label('sort_order', __('system/sys_customer.entry_sort_order'), ['class' => 'col-md-3 col-xs-12 control-label']) !!}
{!! Form::number('sort_order', old('sort_order'), ['class' => 'form-control', 'placeholder' => __('system/sys_customer.entry_sort_order')]) !!}

@lang('system/sys_customer.text_help_1')

@lang('system/sys_customer.text_help_2')

{!! html_entity_decode(Form::label('product', __('system/sys_customer.entry_product') . '', ['class' => 'col-md-3 col-xs-12 control-label'])) !!}
{!! Form::text('product', old('product'), ['class' => 'form-control', 'placeholder' => __('system/sys_customer.entry_product')]) !!} @if ($errors->has('product')) {{ $errors->first('product') }} @endif
{!! html_entity_decode(Form::label('amount_total', __('system/sys_customer.entry_amount_total') . '', ['class' => 'col-md-3 col-xs-12 control-label'])) !!}
{!! Form::number('amount_total', old('amount_total'), ['class' => 'form-control', 'placeholder' => __('system/sys_customer.entry_amount_total')]) !!} @if ($errors->has('amount_total')) {{ $errors->first('amount_total') }} @endif
{!! html_entity_decode(Form::label('quantity_folio', __('system/sys_customer.entry_quantity_folio') . '', ['class' => 'col-md-3 col-xs-12 control-label'])) !!}
{!! Form::number('quantity_folio', old('quantity_folio'), ['class' => 'form-control', 'placeholder' => __('system/sys_customer.entry_quantity_folio')]) !!} @if ($errors->has('quantity_folio')) {!! $errors->first('quantity_folio') !!} @endif
{!! html_entity_decode(Form::label('expiry_date', __('system/sys_customer.entry_expiry_date') . '', ['class' => 'col-md-3 col-xs-12 control-label'])) !!}
{!! Form::text('expiry_date', old('expiry_date',\App\Helpers\Helper::date(\Date::now()->addDays(30))), ['class' => 'form-control', 'placeholder' => __('system/sys_customer.entry_expiry_date')]) !!}
@if ($errors->has('expiry_date')) {{ $errors->first('expiry_date') }} @endif

@lang('system/sys_customer.text_help_3')

@lang('system/sys_customer.text_help_4')

{!! html_entity_decode(Form::label('shop_product_id', __('system/sys_customer.entry_shop_product_id') . ' ', ['class' => 'col-md-3 col-xs-12 control-label'])) !!}
{!! Form::select('shop_product_id', $shop_products,old('shop_product_id'), ['class' => 'form-control', 'placeholder' => __('general.text_select')]) !!} @if ($errors->has('shop_product_id')) {!! $errors->first('shop_product_id') !!} @endif
{!! Form::close() !!}