@extends((( Request::ajax()) ? 'layouts.model' : 'layouts.app' )) @section('include_css') @endsection @section('content')
@if(isset($customer->id))

{{ __('xcustomer::customer.headings.edit_customer')}}

@else

{{ __('xcustomer::customer.headings.new_customer')}}

@endif
@csrf

{{ __('xcustomer::customer.headings.panel_customer_details')}}

{{ formText(__('xcustomer::customer.labels.business_name'), 'business_name', $customer->business_name ?? '', array( 'class' => 'form-control validate[required]' , 'id' => 'business_name'))}}
{{formDropdown('Invoice type', 'invoice_type',getConfig('CUSTOMER_INVOICE_TYPES'),isset($customer->invoice_type) ? $customer->invoice_type : getConfigValue('CUSTOMER_INVOICE_TYPES'), array('class' => 'form-control', 'id' => 'customer_invoice_type'))}} {{--{{formDropdown(__('xcustomer::customer.labels.customer_type'), 'customer_type',getConfig('CUSTOMER_TYPE'),isset($customer->customer_type) ? $customer->customer_type : getConfigValue('CUSTOMER_TYPE'), array('class' => 'form-control', 'id' => 'customer_type'))}}--}}
{{ formText(__('xcustomer::customer.labels.company_name'), 'company_name', $customer->company_name ?? '', array( 'class' => 'form-control validate[required]' , 'id' => 'company_name'))}}
{{ formText(__('xcustomer::customer.labels.mobile'), 'mobile', $customer->mobile ?? '', array( 'class' => 'form-control' , 'id' => 'customer_mobile'))}}
{{ formText(__('xcustomer::customer.labels.telephone'), 'telephone', $customer->telephone ?? '', array( 'class' => 'form-control' , 'id' => 'customer_telephone'))}}
{{ formText('Fax', 'fax', $customer->fax ?? '', array( 'class' => 'form-control' , 'id' => 'fax'))}}
{{formDropdown(__('xcustomer::customer.labels.title'), 'title',getConfig('TITLE'),isset($customer->title) ? $customer->title : getConfigValue('TITLE'), array('class' => 'form-control', 'id' => 'title'))}}
{{ formText(__('xcustomer::customer.labels.first_name'), 'first_name', $customer->fname ?? '', array( 'class' => 'form-control ' , 'id' => 'first_name'))}}
{{ formText(__('xcustomer::customer.labels.last_name'), 'last_name', $customer->lname ?? '', array( 'class' => 'form-control' , 'id' => 'last_name'))}}
{{ formText(__('xcustomer::customer.labels.nic'), 'nic', $customer->nic ?? '', array( 'class' => 'form-control' , 'id' => 'nic'))}}
{{formDropdown('Customer Grade', 'customer_grade',getConfig('CUSTOMER_GRADE'),isset($customer->customer_grade) ? $customer->customer_grade : getConfigValue('CUSTOMER_GRADE'), array('class' => 'form-control', 'id' => 'customer_grade'))}} {{--{{formDropdown(__('xcustomer::customer.labels.customer_type'), 'customer_type',getConfig('CUSTOMER_TYPE'),isset($customer->customer_type) ? $customer->customer_type : getConfigValue('CUSTOMER_TYPE'), array('class' => 'form-control', 'id' => 'customer_type'))}}--}}
{{formEmail(__('xcustomer::customer.labels.email'), 'email', $customer->email ?? '', array( 'class' => 'form-control' , 'id' => 'customer_email'))}}
{{ formText(__('xcustomer::customer.labels.website'), 'website', $customer->website ?? '', array( 'class' => 'form-control' , 'id' => 'website'))}}
{{formTextArea(__('xcustomer::customer.labels.remarks'), 'customer_remarks', $customer->remarks ?? '', array( 'class' => 'form-control' , 'id' => 'customer_remarks', 'rows' => 3))}}

{{ __('xcustomer::customer.headings.panel_customer_payment_details')}}

Rs.
{{ formText(__('xcustomer::customer.labels.outstanding_limit'), 'outstanding_limit', $customer->outstanding_limit ?? 600000, array( 'class' => 'form-control validate[required]', 'id' => 'outstanding_limit'))}}
{{ formText(__('xcustomer::customer.labels.outstanding_day_limit'), 'outstanding_day_limit', $customer->outstanding_max_days ?? getConfig('OUTSTANDING_MAX_DAYS'), array( 'class' => 'form-control validate[required]', 'id' => 'outstanding_day_limit'))}}
{{ formText(__('xcustomer::customer.labels.tax_no'), 'tax_no', $customer->tax_no ?? '', array( 'class' => 'form-control' , 'id' => 'tax_no'))}}
{{ formNumber(__('xcustomer::customer.labels.discount'), 'discount', $customer->discount ?? '', array( 'class' => 'form-control' , 'id' => 'discount'))}}
{{formDropdown(__('xcustomer::customer.labels.discount_type'), 'discount_type',getConfig('DISCOUNT_TYPE'),isset($customer->discount_type) ? $customer->discount_type : getConfigValue('DISCOUNT_TYPE'), array('class' => 'form-control', 'id' => 'discount_type'))}}

Customer Area

{{--
--}} {{--{{formDropdown('Area', 'area',\Pramix\XGeneral\Models\AreaModel::pluck('code','id'), isset($customer->area_id) ? $customer->area_id :'', array('class' => 'form-control select2 validate[required]', 'id' => 'area'))}}--}} {{--
--}}
@php $roles = \Pramix\XUser\Models\User::role('REPRESENTATIVE')->pluck('username','id'); @endphp {{formDropdown('Rep', 'rep',$roles, isset($customer->rep_id) ? $customer->rep_id :'', array('class' => 'form-control select2 validate[required]', 'id' => 'rep'))}}

{{ __('xcustomer::customer.headings.panel_business_address')}}

{{ formText(__('xcustomer::customer.labels.street1'), 'business_street1', $business_address->address_line_1 ?? '', array( 'class' => 'form-control' , 'id' => 'business_street1'))}}
{{ formText(__('xcustomer::customer.labels.street2'), 'business_street2', $business_address->address_line_2 ?? '', array( 'class' => 'form-control' , 'id' => 'business_street2'))}}
{{formDropdown(__('xcustomer::customer.labels.district'), 'business_district_id',\Pramix\XGeneral\Models\DistrictsModel::pluck('name_en','id'), isset($business_address->district_id) ? $business_address->district_id :'', array('class' => 'form-control select2', 'id' => 'business_district_id'))}}
{{formDropdown(__('xcustomer::customer.labels.city'), 'business_city_id',\Pramix\XGeneral\Models\CityModel::pluck('name_en','id'), isset($business_address->city_id) ? $business_address->city_id :'', array('class' => 'form-control select2', 'id' => 'business_city_id'))}}
{{formDropdown(__('xcustomer::customer.labels.country'), 'business_country', $countryList , $business_address->country ?? '' , array('class' => 'form-control select2', 'id' => 'business_country'))}}
{{formTextArea(__('xcustomer::customer.labels.remarks'), 'business_remarks', $business_address->description ?? '', array( 'class' => 'form-control' , 'id' => 'business_remarks', 'rows' => 3))}}

{{ __('xcustomer::customer.headings.panel_shipping_address')}}

{{ formText(__('xcustomer::customer.labels.street1'), 'shipping_street1', $shipping_address->address_line_1 ?? '', array( 'class' => 'form-control' , 'id' => 'shipping_street1'))}}
{{ formText(__('xcustomer::customer.labels.street2'), 'shipping_street2', $shipping_address->address_line_2 ?? '', array( 'class' => 'form-control' , 'id' => 'shipping_street2'))}}
{{formDropdown(__('xcustomer::customer.labels.district'), 'shipping_district_id',\Pramix\XGeneral\Models\DistrictsModel::pluck('name_en','id'), isset($shipping_address->district_id) ? $shipping_address->district_id :'', array('class' => 'form-control select2', 'id' => 'shipping_district_id'))}}
{{formDropdown(__('xcustomer::customer.labels.city'), 'shipping_city_id',\Pramix\XGeneral\Models\CityModel::pluck('name_en','id'), isset($shipping_address->city_id) ? $shipping_address->city_id :'', array('class' => 'form-control select2', 'id' => 'shipping_city_id'))}}
{{formDropdown(__('xcustomer::customer.labels.country'), 'shipping_country', $countryList , $shipping_address->country ?? '' , array('class' => 'form-control select2', 'id' => 'shipping_country'))}}
{{formTextArea(__('xcustomer::customer.labels.remarks'), 'shipping_remarks', $shipping_address->description ?? '', array( 'class' => 'form-control' , 'id' => 'shipping_remarks', 'rows' => 3))}}
@if(Request::ajax()==0)
@include('xgeneral::comment_section')
@endif
@endsection @section('include_js') [] @endsection @section('custom_script') @include('xmedia::qq_template') @endsection