{!! Form::hidden('position', null, ['id' => 'position']); !!}
@php
$common_settings = session()->get('business.common_settings');
$default_credit_limit = !empty($common_settings['default_credit_limit']) ? $common_settings['default_credit_limit'] : null;
@endphp
{!! Form::label('address_line_1', __('lang_v1.address_line_1') . ':') !!}
{!! Form::text('address_line_1', null, ['class' => 'form-control', 'placeholder' => __('lang_v1.address_line_1'), 'rows' => 3]); !!}
{!! Form::label('address_line_2', __('lang_v1.address_line_2') . ':') !!}
{!! Form::text('address_line_2', null, ['class' => 'form-control', 'placeholder' => __('lang_v1.address_line_2'), 'rows' => 3]); !!}
@php
$custom_labels = json_decode(session('business.custom_labels'), true);
$contact_custom_field1 = !empty($custom_labels['contact']['custom_field_1']) ? $custom_labels['contact']['custom_field_1'] : __('lang_v1.contact_custom_field1');
$contact_custom_field2 = !empty($custom_labels['contact']['custom_field_2']) ? $custom_labels['contact']['custom_field_2'] : __('lang_v1.contact_custom_field2');
$contact_custom_field3 = !empty($custom_labels['contact']['custom_field_3']) ? $custom_labels['contact']['custom_field_3'] : __('lang_v1.contact_custom_field3');
$contact_custom_field4 = !empty($custom_labels['contact']['custom_field_4']) ? $custom_labels['contact']['custom_field_4'] : __('lang_v1.contact_custom_field4');
$contact_custom_field5 = !empty($custom_labels['contact']['custom_field_5']) ? $custom_labels['contact']['custom_field_5'] : __('lang_v1.custom_field', ['number' => 5]);
$contact_custom_field6 = !empty($custom_labels['contact']['custom_field_6']) ? $custom_labels['contact']['custom_field_6'] : __('lang_v1.custom_field', ['number' => 6]);
$contact_custom_field7 = !empty($custom_labels['contact']['custom_field_7']) ? $custom_labels['contact']['custom_field_7'] : __('lang_v1.custom_field', ['number' => 7]);
$contact_custom_field8 = !empty($custom_labels['contact']['custom_field_8']) ? $custom_labels['contact']['custom_field_8'] : __('lang_v1.custom_field', ['number' => 8]);
$contact_custom_field9 = !empty($custom_labels['contact']['custom_field_9']) ? $custom_labels['contact']['custom_field_9'] : __('lang_v1.custom_field', ['number' => 9]);
$contact_custom_field10 = !empty($custom_labels['contact']['custom_field_10']) ? $custom_labels['contact']['custom_field_10'] : __('lang_v1.custom_field', ['number' => 10]);
@endphp
{!! Form::label('custom_field1', $contact_custom_field1 . ':') !!}
{!! Form::text('custom_field1', null, ['class' => 'form-control',
'placeholder' => $contact_custom_field1]); !!}
{!! Form::label('custom_field2', $contact_custom_field2 . ':') !!}
{!! Form::text('custom_field2', null, ['class' => 'form-control',
'placeholder' => $contact_custom_field2]); !!}
{!! Form::label('custom_field3', $contact_custom_field3 . ':') !!}
{!! Form::text('custom_field3', null, ['class' => 'form-control',
'placeholder' => $contact_custom_field3]); !!}
{!! Form::label('custom_field4', $contact_custom_field4 . ':') !!}
{!! Form::text('custom_field4', null, ['class' => 'form-control',
'placeholder' => $contact_custom_field4]); !!}
{!! Form::label('custom_field5', $contact_custom_field5 . ':') !!}
{!! Form::text('custom_field5', null, ['class' => 'form-control',
'placeholder' => $contact_custom_field5]); !!}
{!! Form::label('custom_field6', $contact_custom_field6 . ':') !!}
{!! Form::text('custom_field6', null, ['class' => 'form-control',
'placeholder' => $contact_custom_field6]); !!}
{!! Form::label('custom_field7', $contact_custom_field7 . ':') !!}
{!! Form::text('custom_field7', null, ['class' => 'form-control',
'placeholder' => $contact_custom_field7]); !!}
{!! Form::label('custom_field8', $contact_custom_field8 . ':') !!}
{!! Form::text('custom_field8', null, ['class' => 'form-control',
'placeholder' => $contact_custom_field8]); !!}
{!! Form::label('custom_field9', $contact_custom_field9 . ':') !!}
{!! Form::text('custom_field9', null, ['class' => 'form-control',
'placeholder' => $contact_custom_field9]); !!}
{!! Form::label('custom_field10', $contact_custom_field10 . ':') !!}
{!! Form::text('custom_field10', null, ['class' => 'form-control',
'placeholder' => $contact_custom_field10]); !!}
{{__('lang_v1.shipping_address')}}
{!! Form::text('shipping_address', null, ['class' => 'form-control',
'placeholder' => __('lang_v1.search_address'), 'id' => 'shipping_address']); !!}
@php
$shipping_custom_label_1 = !empty($custom_labels['shipping']['custom_field_1']) ? $custom_labels['shipping']['custom_field_1'] : '';
$shipping_custom_label_2 = !empty($custom_labels['shipping']['custom_field_2']) ? $custom_labels['shipping']['custom_field_2'] : '';
$shipping_custom_label_3 = !empty($custom_labels['shipping']['custom_field_3']) ? $custom_labels['shipping']['custom_field_3'] : '';
$shipping_custom_label_4 = !empty($custom_labels['shipping']['custom_field_4']) ? $custom_labels['shipping']['custom_field_4'] : '';
$shipping_custom_label_5 = !empty($custom_labels['shipping']['custom_field_5']) ? $custom_labels['shipping']['custom_field_5'] : '';
@endphp
@if(!empty($custom_labels['shipping']['is_custom_field_1_contact_default']) && !empty($shipping_custom_label_1))
@php
$label_1 = $shipping_custom_label_1 . ':';
@endphp
{!! Form::label('shipping_custom_field_1', $label_1 ) !!}
{!! Form::text('shipping_custom_field_details[shipping_custom_field_1]', null, ['class' => 'form-control','placeholder' => $shipping_custom_label_1]); !!}
@endif
@if(!empty($custom_labels['shipping']['is_custom_field_2_contact_default']) && !empty($shipping_custom_label_2))
@php
$label_2 = $shipping_custom_label_2 . ':';
@endphp
{!! Form::label('shipping_custom_field_2', $label_2 ) !!}
{!! Form::text('shipping_custom_field_details[shipping_custom_field_2]', null, ['class' => 'form-control','placeholder' => $shipping_custom_label_2]); !!}
@endif
@if(!empty($custom_labels['shipping']['is_custom_field_3_contact_default']) && !empty($shipping_custom_label_3))
@php
$label_3 = $shipping_custom_label_3 . ':';
@endphp
{!! Form::label('shipping_custom_field_3', $label_3 ) !!}
{!! Form::text('shipping_custom_field_details[shipping_custom_field_3]', null, ['class' => 'form-control','placeholder' => $shipping_custom_label_3]); !!}
@endif
@if(!empty($custom_labels['shipping']['is_custom_field_4_contact_default']) && !empty($shipping_custom_label_4))
@php
$label_4 = $shipping_custom_label_4 . ':';
@endphp
{!! Form::label('shipping_custom_field_4', $label_4 ) !!}
{!! Form::text('shipping_custom_field_details[shipping_custom_field_4]', null, ['class' => 'form-control','placeholder' => $shipping_custom_label_4]); !!}
@endif
@if(!empty($custom_labels['shipping']['is_custom_field_5_contact_default']) && !empty($shipping_custom_label_5))
@php
$label_5 = $shipping_custom_label_5 . ':';
@endphp
{!! Form::label('shipping_custom_field_5', $label_5 ) !!}
{!! Form::text('shipping_custom_field_details[shipping_custom_field_5]', null, ['class' => 'form-control','placeholder' => $shipping_custom_label_5]); !!}
@endif
@if(!empty($common_settings['is_enabled_export']))
@php
$i = 1;
@endphp
@for($i; $i <= 6 ; $i++)
{!! Form::label('export_custom_field_'.$i, __('lang_v1.export_custom_field'.$i).':' ) !!}
{!! Form::text('export_custom_field_'.$i, null, ['class' => 'form-control','placeholder' => __('lang_v1.export_custom_field'.$i)]); !!}
@endfor
@endif