@component('components.widget', ['title' => __('product.product_info'),'class' => '','icon'=>'
{!! Form::label('category_id', __('product.product_category') . ':', ['class' => 'form-label']) !!}
{!! Form::select('category_id', $categories, !empty($duplicate_product->category_id) ? $duplicate_product->category_id : null, ['placeholder' => __('messages.please_select'), 'class' => 'form-select select2']); !!}
{!! Form::label('sub_category_id', __('product.sub_category') . ':', ['class' => 'form-label']) !!}
{!! Form::select('sub_category_id', $sub_categories, !empty($duplicate_product->sub_category_id) ? $duplicate_product->sub_category_id : null, ['placeholder' => __('messages.please_select'), 'class' => 'form-select select2']); !!}
{!! Form::label('sub_unit_ids', __('product.related_sub_units') . ':', ['class' => 'form-label']) !!}
@show_tooltip(__('product.sub_units_tooltip'))
{!! Form::select('sub_unit_ids[]', [], !empty($duplicate_product->sub_unit_ids) ? $duplicate_product->sub_unit_ids : null, ['class' => 'form-select select2', 'multiple', 'id' => 'sub_unit_ids']); !!}
@if(!empty($common_settings['enable_secondary_unit']))
{!! Form::label('secondary_unit_id', __('app.secondary_unit') . ':', ['class' => 'form-label']) !!}
@show_tooltip(__('product.secondary_unit_help'))
{!! Form::select('secondary_unit_id', $units, !empty($duplicate_product->secondary_unit_id) ? $duplicate_product->secondary_unit_id : null, ['class' => 'form-select select2']); !!}
@endif
@php
$default_location = null;
if(count($business_locations) == 1){
$default_location = array_key_first($business_locations->toArray());
}
@endphp
{!! Form::label('product_locations', __('business.business_location') . ':', ['class' => 'form-label']) !!}
@show_tooltip(__('product.product_location_help'))
{!! Form::select('product_locations[]', $business_locations, $default_location, ['class' => 'form-select select2', 'multiple', 'id' => 'product_locations']); !!}
{!! Form::label('alert_quantity', __('product.alert_quantity') . ':', ['class' => 'form-label']) !!}
@show_tooltip(__('product.alert_quantity'))
{!! Form::text('alert_quantity', !empty($duplicate_product->alert_quantity) ? @format_quantity($duplicate_product->alert_quantity) : null , ['class' => 'form-control input_number',
'placeholder' => __('product.alert_quantity'), 'min' => '0']); !!}
@if(!empty($common_settings['enable_product_warranty']))
{!! Form::label('warranty_id', __('app.warranty') . ':', ['class' => 'form-label']) !!}
{!! Form::select('warranty_id', $warranties, null, ['class' => 'form-select select2', 'placeholder' => __('messages.please_select')]); !!}
@endif
@if(!empty($pos_module_data))
@foreach($pos_module_data as $key => $value)
@if(!empty($value['view_path']))
@includeIf($value['view_path'], ['view_data' => $value['view_data']])
@endif
@endforeach
@endif
{!! Form::label('product_description', __('product.product_description') . ':', ['class' => 'form-label']) !!}
{!! Form::textarea('product_description', !empty($duplicate_product->product_description) ? $duplicate_product->product_description : null, ['class' => 'form-control']); !!}
@include('product.partials.single_product_form_part', ['profit_percent' => $default_profit_percent])