{!! Form::label('name', __('product.product_name') . ':*') !!}
{!! Form::text('name', $product_name, ['class' => 'form-control input-sm', 'required',
'placeholder' => __('product.product_name')]); !!}
{!! Form::select('type', ['single' => 'Single', 'variable' => 'Variable'], 'single', ['class' => 'hide', 'id' => 'type']); !!}
{!! Form::label('sku', __('product.sku') . ':') !!} @show_tooltip(__('tooltip.sku'))
{!! Form::text('sku', null, ['class' => 'form-control input-sm',
'placeholder' => __('product.sku')]); !!}
{!! Form::label('barcode_type', __('product.barcode_type') . ':*') !!}
{!! Form::select('barcode_type', $barcode_types, 'C128', ['class' => 'form-control select2', 'required']); !!}
{!! Form::label('unit_id', __('product.unit') . ':*') !!}
{!! Form::select('unit_id', $units, '1', ['class' => 'form-control select2 input-sm', 'required']); !!}
{!! Form::label('sub_unit_ids', __('lang_v1.related_sub_units') . ':') !!} @show_tooltip(__('lang_v1.sub_units_tooltip'))
{!! Form::select('sub_unit_ids[]', [], null, ['class' => 'form-control select2', 'multiple', 'id' => 'sub_unit_ids']); !!}
{!! Form::label('brand_id', __('product.brand') . ':') !!}
{!! Form::select('brand_id', $brands, null, ['placeholder' => __('messages.please_select'), 'class' => 'form-control select2']); !!}
{!! Form::label('category_id', __('product.category') . ':') !!}
{!! Form::select('category_id', $categories, null, ['placeholder' => __('messages.please_select'), 'class' => 'form-control select2']); !!}
{!! Form::label('sub_category_id', __('product.sub_category') . ':') !!}
{!! Form::select('sub_category_id', [], null, ['placeholder' => __('messages.please_select'), 'class' => 'form-control select2']); !!}
@php
$custom_labels = json_decode(session('business.custom_labels'), true);
$product_custom_field1 = !empty($custom_labels['product']['custom_field_1']) ? $custom_labels['product']['custom_field_1'] : __('lang_v1.product_custom_field1');
$product_custom_field2 = !empty($custom_labels['product']['custom_field_2']) ? $custom_labels['product']['custom_field_2'] : __('lang_v1.product_custom_field2');
$product_custom_field3 = !empty($custom_labels['product']['custom_field_3']) ? $custom_labels['product']['custom_field_3'] : __('lang_v1.product_custom_field3');
$product_custom_field4 = !empty($custom_labels['product']['custom_field_4']) ? $custom_labels['product']['custom_field_4'] : __('lang_v1.product_custom_field4');
@endphp
{!! Form::label('product_custom_field1', $product_custom_field1 . ':') !!}
{!! Form::text('product_custom_field1', $product_field1, ['class' => 'form-control input-sm', 'placeholder' => $product_custom_field1]); !!}
{!! Form::label('product_custom_field2', $product_custom_field2 . ':') !!}
{!! Form::text('product_custom_field2',$product_field2, ['class' => 'form-control input-sm', 'placeholder' => $product_custom_field2]); !!}
{!! Form::label('product_custom_field3', $product_custom_field3 . ':') !!}
{!! Form::text('product_custom_field3', $product_field3, ['class' => 'form-control input-sm', 'placeholder' => $product_custom_field3]); !!}
{!! Form::label('product_custom_field4', $product_custom_field4 . ':') !!}
{!! Form::text('product_custom_field4', $product_field4, ['class' => 'form-control input-sm', 'placeholder' => $product_custom_field4]); !!}
@show_tooltip(__('tooltip.enable_stock'))
{!! Form::label('alert_quantity', __('product.alert_quantity') . ':') !!}
{!! Form::text('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', __('lang_v1.warranty') . ':') !!}
{!! Form::select('warranty_id', $warranties, null, ['class' => 'form-control select2', 'placeholder' => __('messages.please_select')]); !!}
@endif
@if(session('business.enable_product_expiry'))
@if(session('business.expiry_type') == 'add_expiry')
@php
$expiry_period = 12;
$hide = true;
@endphp
@else
@php
$expiry_period = null;
$hide = false;
@endphp
@endif
@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_locations') . ':') !!} @show_tooltip(__('lang_v1.product_location_help'))
{!! Form::select('product_locations[]', $business_locations, $default_location, ['class' => 'form-control select2', 'multiple', 'id' => 'product_locations']); !!}
{!! Form::label('weight', __('lang_v1.weight') . ':') !!}
{!! Form::text('weight', null, ['class' => 'form-control', 'placeholder' => __('lang_v1.weight')]); !!}
{!! Form::label('product_description', __('lang_v1.product_description') . ':') !!}
{!! Form::textarea('product_description', null, ['class' => 'form-control']); !!}
{!! Form::label('tax', __('product.applicable_tax') . ':') !!}
{!! Form::select('tax', $taxes, null, ['placeholder' => __('messages.please_select'), 'class' => 'form-control select2'], $tax_attributes); !!}
{!! Form::label('tax_type', __('product.selling_price_tax_type') . ':*') !!}
{!! Form::select('tax_type', ['inclusive' => __('product.inclusive'), 'exclusive' => __('product.exclusive')], 'exclusive',
['class' => 'form-control select2', 'required']); !!}
@show_tooltip(__('lang_v1.tooltip_sr_no'))
@show_tooltip(__('lang_v1.tooltip_not_for_selling'))
@if(!empty($module_form_parts))
@foreach($module_form_parts as $key => $value)
@if(!empty($value['template_path']))
@php
$template_data = $value['template_data'] ?: [];
@endphp
@include($value['template_path'], $template_data)
@endif
@endforeach
@endif
@if(!empty($product_for) && $product_for == 'pos')
@include('product.partials.quick_product_opening_stock', ['locations' => $locations])
@endif