{!! Form::open(['url' => action([\App\Http\Controllers\BusinessLocationController::class, 'postUpdate'], [$location->id]), 'method' => 'POST', 'id' => 'business_location_add_form' ]) !!} {!! Form::hidden('hidden_id', $location->id, ['id' => 'hidden_id']); !!}

@lang( 'business.edit_business_location' )

{!! Form::label('name', __( 'invoice.name' ) . ':*') !!} {!! Form::text('name', $location->name, ['class' => 'form-control', 'required', 'placeholder' => __( 'invoice.name' ) ]); !!}
{!! Form::label('location_id', __( 'lang_v1.location_id' ) . ':') !!} {!! Form::text('location_id', $location->location_id, ['class' => 'form-control', 'placeholder' => __( 'lang_v1.location_id' ) ]); !!}
{!! Form::label('landmark', __( 'business.landmark' ) . ':') !!} {!! Form::text('landmark', $location->landmark, ['class' => 'form-control', 'placeholder' => __( 'business.landmark' ) ]); !!}
{!! Form::label('city', __( 'business.city' ) . ':*') !!} {!! Form::text('city', $location->city, ['class' => 'form-control', 'placeholder' => __( 'business.city'), 'required' ]); !!}
{!! Form::label('zip_code', __( 'business.zip_code' ) . ':*') !!} {!! Form::text('zip_code', $location->zip_code, ['class' => 'form-control', 'placeholder' => __( 'business.zip_code'), 'required' ]); !!}
{!! Form::label('state', __( 'business.state' ) . ':*') !!} {!! Form::text('state', $location->state, ['class' => 'form-control', 'placeholder' => __( 'business.state'), 'required' ]); !!}
{!! Form::label('country', __( 'business.country' ) . ':*') !!} {!! Form::text('country', $location->country, ['class' => 'form-control', 'placeholder' => __( 'business.country'), 'required' ]); !!}
{!! Form::label('mobile', __( 'business.mobile' ) . ':') !!} {!! Form::text('mobile', $location->mobile, ['class' => 'form-control', 'placeholder' => __( 'business.mobile')]); !!}
{!! Form::label('alternate_number', __( 'business.alternate_number' ) . ':') !!} {!! Form::text('alternate_number', $location->alternate_number, ['class' => 'form-control', 'placeholder' => __( 'business.alternate_number')]); !!}
{!! Form::label('email', __( 'business.email' ) . ':') !!} {!! Form::email('email', $location->email, ['class' => 'form-control', 'placeholder' => __( 'business.email')]); !!}
{!! Form::label('website', __( 'lang_v1.website' ) . ':') !!} {!! Form::text('website', $location->website, ['class' => 'form-control', 'placeholder' => __( 'lang_v1.website')]); !!}
{!! Form::label('promotion_max_price', __( 'business.promotion_max_price' ) . ':') !!} {!! Form::text('promotion_max_price', (float)$location->promotion_max_price, ['class' => 'form-control', 'placeholder' => __( 'business.promotion_max_price')]); !!}

@lang('business.promotion_max_price_help')

{!! Form::label('tax', __('tax_rate.default_tax_rate'). ':') !!} {!! Form::select('tax', array('' => 'Please Select') + $tax_rates, $location->tax, ['class' => 'form-control select2']) !!}
{!! Form::label('invoice_scheme_id', __('invoice.invoice_scheme') . ':*') !!} @show_tooltip(__('tooltip.invoice_scheme')) {!! Form::select('invoice_scheme_id', $invoice_schemes, $location->invoice_scheme_id, ['class' => 'form-control', 'required', 'placeholder' => __('messages.please_select')]); !!}
{!! Form::label('invoice_layout_id', __('lang_v1.invoice_layout_for_pos') . ':*') !!} @show_tooltip(__('tooltip.invoice_layout')) {!! Form::select('invoice_layout_id', $invoice_layouts, $location->invoice_layout_id, ['class' => 'form-control', 'required', 'placeholder' => __('messages.please_select')]); !!}
{!! Form::label('sale_invoice_layout_id', __('lang_v1.invoice_layout_for_sale') . ':*') !!} @show_tooltip(__('tooltip.invoice_layout')) {!! Form::select('sale_invoice_layout_id', $invoice_layouts, $location->sale_invoice_layout_id, ['class' => 'form-control', 'required', 'placeholder' => __('messages.please_select')]); !!}
{!! Form::label('selling_price_group_id', __('lang_v1.default_selling_price_group') . ':') !!} @show_tooltip(__('lang_v1.location_price_group_help')) {!! Form::select('selling_price_group_id', $price_groups, $location->selling_price_group_id, ['class' => 'form-control', 'placeholder' => __('messages.please_select')]); !!}
@php $custom_labels = json_decode(session('business.custom_labels'), true); $location_custom_field1 = !empty($custom_labels['location']['custom_field_1']) ? $custom_labels['location']['custom_field_1'] : __('lang_v1.location_custom_field1'); $location_custom_field2 = !empty($custom_labels['location']['custom_field_2']) ? $custom_labels['location']['custom_field_2'] : __('lang_v1.location_custom_field2'); $location_custom_field3 = !empty($custom_labels['location']['custom_field_3']) ? $custom_labels['location']['custom_field_3'] : __('lang_v1.location_custom_field3'); $location_custom_field4 = !empty($custom_labels['location']['custom_field_4']) ? $custom_labels['location']['custom_field_4'] : __('lang_v1.location_custom_field4'); @endphp
{!! Form::label('custom_field1', $location_custom_field1 . ':') !!} {!! Form::text('custom_field1', $location->custom_field1, ['class' => 'form-control', 'placeholder' => $location_custom_field1]); !!}
{!! Form::label('custom_field2', $location_custom_field2 . ':') !!} {!! Form::text('custom_field2', $location->custom_field2, ['class' => 'form-control', 'placeholder' => $location_custom_field2]); !!}
{!! Form::label('custom_field3', $location_custom_field3 . ':') !!} {!! Form::text('custom_field3', $location->custom_field3, ['class' => 'form-control', 'placeholder' => $location_custom_field3]); !!}
{!! Form::label('custom_field4', $location_custom_field4 . ':') !!} {!! Form::text('custom_field4', $location->custom_field4, ['class' => 'form-control', 'placeholder' => $location_custom_field4]); !!}

{!! Form::label('featured_products', __('lang_v1.pos_screen_featured_products') . ':') !!} @show_tooltip(__('lang_v1.featured_products_help')) {!! Form::select('featured_products[]', $featured_products, $location->featured_products, ['class' => 'form-control', 'id' => 'featured_products', 'multiple']); !!}

@lang('lang_v1.payment_options'): @show_tooltip(__('lang_v1.payment_option_help'))
@php $default_payment_accounts = !empty($location->default_payment_accounts) ? json_decode($location->default_payment_accounts, true) : []; @endphp @foreach($payment_types as $key => $value) @if ($key == 'cash' || $key == 'card' || $key == 'debit') @else @endif @endforeach
@lang('lang_v1.payment_method') @lang('lang_v1.enable') @lang('lang_v1.default_accounts') @show_tooltip(__('lang_v1.default_account_help'))
{{$value}}{!! Form::checkbox('default_payment_accounts[' . $key . '][is_enabled]', 1, !empty($default_payment_accounts[$key]['is_enabled'])); !!}{!! Form::checkbox('default_payment_accounts[' . $key . '][is_enabled]', 0, !empty($default_payment_accounts[$key]['is_enabled'])); !!} {!! Form::select('default_payment_accounts[' . $key . '][account]', $accounts, !empty($default_payment_accounts[$key]['account']) ? $default_payment_accounts[$key]['account'] : null, ['class' => 'form-control input-sm']); !!}
@lang('lang_v1.customer_screen_settings')
{!! Form::label('full_screen_password', __('lang_v1.full_screen_password') . ':') !!} {!! Form::input('password', 'full_screen_password', $location->full_screen_password , ['class' => 'form-control', 'autocomplete' => 'off', 'placeholder' => __( 'business.password' ) ] ); !!}
{!! Form::label('promotion_slider_speed', __('lang_v1.promotion_slider_speed') . ':') !!} {!! Form::select('promotion_slider_speed', [1 => '1 Sec', 5 => '5 Sec', 25 => '25 Sec'], $location->promotion_slider_speed, ['class' => 'form-control', 'placeholder' => __('messages.please_select')]); !!}
{!! Form::label('customer_screen_picture', __('lang_v1.customer_screen_picture_1'). '1:' ) !!} {!! Form::file('customer_screen_picture[]', ['class' => 'form-control customer_screen_picture', 'id' => 'customer_screen_picture_1', 'onchange' => 'putImage(event, 1)']) !!} @php $pictures_arr = json_decode($location->customer_screen_picture); $button_remove_one = 'hide'; $picture_one = asset('img/no_img.png'); if($pictures_arr) { if(property_exists($pictures_arr[0], 'picture1')) { $picture_one = asset('img/picture_location/'.$pictures_arr[0]->picture1); $button_remove_one = ''; } } @endphp

{!! Form::label('customer_screen_picture', __('lang_v1.customer_screen_picture_1'). '2:' ) !!} {!! Form::file('customer_screen_picture[]', ['class' => 'form-control customer_screen_picture', 'id' => 'customer_screen_picture_2', 'onchange' => 'putImage(event, 2)']) !!} @php $pictures_arr = json_decode($location->customer_screen_picture); $button_remove_two = 'hide'; $picture_two = asset('img/no_img.png'); if($pictures_arr) { if(property_exists($pictures_arr[0], 'picture2')) { $picture_two = asset('img/picture_location/'.$pictures_arr[0]->picture2); $button_remove_two = ''; } } @endphp

{!! Form::label('customer_screen_picture', __('lang_v1.customer_screen_picture_1'). '3:' ) !!} {!! Form::file('customer_screen_picture[]', ['class' => 'form-control customer_screen_picture', 'id' => 'customer_screen_picture_3', 'onchange' => 'putImage(event, 3)']) !!} @php $pictures_arr = json_decode($location->customer_screen_picture); $button_remove_three = 'hide'; $picture_three = asset('img/no_img.png'); if($pictures_arr) { if(property_exists($pictures_arr[0], 'picture3')) { $picture_three = asset('img/picture_location/'.$pictures_arr[0]->picture3); $button_remove_three = ''; } } @endphp


{!! Form::close() !!}