{!! Form::open(['url' => action([\App\Http\Controllers\ProductController::class, 'saveQuickProduct']), 'method' => 'post', 'id' => 'quick_add_product_form' ]) !!}
×
@lang( 'product.add_new_product' )
{!! Form::label('name', __('product.product_name') . ':*') !!} {!! Form::text('name', $product_name, ['class' => 'form-control', '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', '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, null, ['class' => 'form-control select2', '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']); !!}
{!! Form::checkbox('enable_stock', 1, true, ['class' => 'input-icheck', 'id' => 'enable_stock']); !!}
@lang('product.manage_stock')
@show_tooltip(__('tooltip.enable_stock'))
@lang('product.enable_stock_help')
{!! 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
{!! Form::label('expiry_period', __('product.expires_in') . ':') !!}
{!! Form::text('expiry_period', $expiry_period, ['class' => 'form-control pull-left input_number', 'placeholder' => __('product.expiry_period'), 'style' => 'width:60%;']); !!} {!! Form::select('expiry_period_type', ['months'=>__('product.months'), 'days'=>__('product.days'), '' =>__('product.not_applicable') ], 'months', ['class' => 'form-control select2 pull-left', 'style' => 'width:40%;', 'id' => 'expiry_period_type']); !!}
@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']); !!}
{!! Form::checkbox('enable_sr_no', 1, false, ['class' => 'input-icheck']); !!}
@lang('lang_v1.enable_imei_or_sr_no')
@show_tooltip(__('lang_v1.tooltip_sr_no'))
@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::checkbox('not_for_selling', 1, false, ['class' => 'input-icheck']); !!}
@lang('lang_v1.not_for_selling')
@show_tooltip(__('lang_v1.tooltip_not_for_selling'))
{!! Form::label('product_custom_field1', $product_custom_field1 . ':') !!} {!! Form::text('product_custom_field1', null, ['class' => 'form-control', 'placeholder' => $product_custom_field1]); !!}
{!! Form::label('product_custom_field2', $product_custom_field2 . ':') !!} {!! Form::text('product_custom_field2',null, ['class' => 'form-control', 'placeholder' => $product_custom_field2]); !!}
{!! Form::label('product_custom_field3', $product_custom_field3 . ':') !!} {!! Form::text('product_custom_field3', null, ['class' => 'form-control', 'placeholder' => $product_custom_field3]); !!}
{!! Form::label('product_custom_field4', $product_custom_field4 . ':') !!} {!! Form::text('product_custom_field4', null, ['class' => 'form-control', 'placeholder' => $product_custom_field4]); !!}
@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
@include('product.partials.single_product_form_part', ['profit_percent' => $default_profit_percent, 'quick_add' => true ])
@if(!empty($product_for) && $product_for == 'pos') @include('product.partials.quick_product_opening_stock', ['locations' => $locations]) @endif
{!! Form::close() !!}