Files
kulakpos_web/Modules/Business/resources/views/manage-settings/product.blade.php

471 lines
31 KiB
PHP
Raw Normal View History

2026-03-15 17:08:23 +07:00
<div class="tab-pane fade" id="product" role="tabpanel" aria-labelledby="product-tab">
<div class="table-header p-16">
<h4>{{ __('Product Settings') }}</h4>
<div class="custom-control custom-checkbox d-flex align-items-center gap-2">
<input type="checkbox" class="custom-control-input delete-checkbox-item multi-delete" id="selectAll">
<label class="custom-control-label fw-bold" for="selectAll">{{ __('Select All') }}</label>
</div>
</div>
<div class="order-form-section p-16">
<form action="{{ route('business.product.settings.update') }}" method="post" class="ajaxform">
@csrf
<div class="row product-setting-form mt-3">
<div class="col-lg-3">
<h3 class="title">{{ __('Add Product Settings') }}
<svg class="svg" width="16" height="17" viewBox="0 0 16 17" fill="none"
xmlns="http://www.w3.org/2000/svg">
<g opacity="0.8">
<path
d="M7.99967 15.1615C11.6816 15.1615 14.6663 12.1767 14.6663 8.49479C14.6663 4.81289 11.6816 1.82812 7.99967 1.82812C4.31778 1.82812 1.33301 4.81289 1.33301 8.49479C1.33301 12.1767 4.31778 15.1615 7.99967 15.1615Z"
fill="#97979F" stroke="#97979F" stroke-width="1.5" stroke-linecap="round"
stroke-linejoin="round" />
<path d="M8 5.82812V8.49479" stroke="white" stroke-width="1.5" stroke-linecap="round"
stroke-linejoin="round" />
<path d="M8 11.1719H8.00833" stroke="white" stroke-width="1.5" stroke-linecap="round"
stroke-linejoin="round" />
</g>
</svg>
</h3>
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_product_price" value="0">
<input id="product_price" class="delete-checkbox-item multi-delete" type="checkbox"
name="show_product_price" value="1"
{{ is_null($product_setting) || is_null($product_setting->modules) || (optional($product_setting->modules)['show_product_price'] ?? false) ? 'checked' : '' }}>
<label for="product_price">
{{__('Product Price')}}
</label>
</div>
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_product_code" value="0">
<input id="product_code" class="delete-checkbox-item multi-delete" type="checkbox"
name="show_product_code" value="1"
{{ optional($product_setting?->modules)['show_product_code'] === '1' ? 'checked' : '' }}>
<label for="product_code">{{__('Product Code')}}</label>
</div>
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_product_stock" value="0">
<input id="stock" class="delete-checkbox-item multi-delete" type="checkbox"
name="show_product_stock" value="1"
{{ is_null($product_setting) || is_null($product_setting->modules) || (optional($product_setting->modules)['show_product_stock'] ?? false) ? 'checked' : '' }}>
<label for="stock">{{__('Product Stock')}}</label>
</div>
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_product_unit" value="0">
<input id="unit" class="delete-checkbox-item multi-delete" type="checkbox"
name="show_product_unit" value="1"
{{ is_null($product_setting) || is_null($product_setting->modules) || (optional($product_setting->modules)['show_product_unit'] ?? false) ? 'checked' : '' }}>
<label for="unit">{{__('Product Unit')}}</label>
</div>
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_product_brand" value="0">
<input id="brand" class="delete-checkbox-item multi-delete" type="checkbox"
name="show_product_brand" value="1"
{{ optional($product_setting?->modules)['show_product_brand'] === '1' ? 'checked' : '' }}>
<label for="brand">{{__('Product Brand')}}</label>
</div>
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_model_no" value="0">
<input id="model" type="checkbox" class="delete-checkbox-item multi-delete"
name="show_model_no" value="1"
{{ optional($product_setting?->modules)['show_model_no'] === '1' ? 'checked' : '' }}>
<label for="model">{{__('Model No')}}</label>
</div>
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_product_category" value="0">
<input id="category" class="delete-checkbox-item multi-delete" type="checkbox"
name="show_product_category" value="1"
{{ is_null($product_setting) || is_null($product_setting->modules) || (optional($product_setting->modules)['show_product_category'] ?? false) ? 'checked' : '' }}>
<label for="category">{{__('Product Category')}}</label>
</div>
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_product_manufacturer" value="0">
<input id="manufacturer" class="delete-checkbox-item multi-delete" type="checkbox"
name="show_product_manufacturer" value="1"
{{ optional($product_setting?->modules)['show_product_manufacturer'] === '1' ? 'checked' : '' }}>
<label for="manufacturer">{{__('Product Manufacturer')}}</label>
</div>
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_product_image" value="0">
<input id="image" class="delete-checkbox-item multi-delete" type="checkbox"
name="show_product_image" value="1"
{{ optional($product_setting?->modules)['show_product_image'] === '1' ? 'checked' : '' }}>
<label for="image">{{__('Product Image')}}</label>
</div>
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_alert_qty" value="0">
<input id="quantity" class="delete-checkbox-item multi-delete" type="checkbox"
name="show_alert_qty" value="1"
{{ is_null($product_setting) || is_null($product_setting->modules) || (optional($product_setting->modules)['show_alert_qty'] ?? false) ? 'checked' : '' }}>
<label for="quantity">{{__('Low Stock Alert')}}</label>
</div>
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_vat_id" value="0">
<input id="vat" class="delete-checkbox-item multi-delete" type="checkbox"
name="show_vat_id" value="1"
{{ optional($product_setting?->modules)['show_vat_id'] === '1' ? 'checked' : '' }}>
<label for="vat">{{__('VAT ID')}}</label>
</div>
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_vat_type" value="0">
<input id="type" class="delete-checkbox-item multi-delete" type="checkbox"
name="show_vat_type" value="1"
{{ optional($product_setting?->modules)['show_vat_type'] === '1' ? 'checked' : '' }}>
<label for="type">{{__('VAT Type')}}</label>
</div>
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_exclusive_price" value="0">
<input id="exclusive" class="delete-checkbox-item multi-delete" type="checkbox"
name="show_exclusive_price" value="1"
{{ is_null($product_setting) || is_null($product_setting->modules) || (optional($product_setting->modules)['show_exclusive_price'] ?? false) ? 'checked' : '' }}>
<label for="exclusive">{{__('Exclusive Price')}}</label>
</div>
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_inclusive_price" value="0">
<input id="inclusive" class="delete-checkbox-item multi-delete" type="checkbox"
name="show_inclusive_price" value="1"
{{ is_null($product_setting) || is_null($product_setting->modules) || (optional($product_setting->modules)['show_inclusive_price'] ?? false) ? 'checked' : '' }}>
<label for="inclusive">{{__('Inclusive Price')}}</label>
</div>
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_profit_percent" value="0">
<input id="percent" class="delete-checkbox-item multi-delete" type="checkbox"
name="show_profit_percent" value="1"
{{ is_null($product_setting) || is_null($product_setting->modules) || (optional($product_setting->modules)['show_profit_percent'] ?? false) ? 'checked' : '' }}>
<label for="percent">{{__('Profit Percent')}}</label>
</div>
@if (moduleCheck('warehouseAddon'))
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_warehouse" value="0">
<input id="warehouse" class="delete-checkbox-item multi-delete" type="checkbox"
name="show_warehouse" value="1"
{{ optional($product_setting?->modules)['show_warehouse'] === '1' ? 'checked' : '' }}>
<label for="warehouse">{{__('Warehouse')}}</label>
</div>
@endif
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_rack" value="0">
<input id="rack" class="delete-checkbox-item multi-delete" type="checkbox"
name="show_rack" value="1"
{{ optional($product_setting?->modules)['show_rack'] === '1' ? 'checked' : '' }}>
<label for="rack">{{__('Rack')}}</label>
</div>
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_shelf" value="0">
<input id="shelf" class="delete-checkbox-item multi-delete" type="checkbox"
name="show_shelf" value="1"
{{ optional($product_setting?->modules)['show_shelf'] === '1' ? 'checked' : '' }}>
<label for="shelf">{{__('Shelf')}}</label>
</div>
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_action" value="0">
<input id="show_action" class="delete-checkbox-item multi-delete" type="checkbox"
name="show_action" value="1"
{{ optional($product_setting?->modules)['show_action'] === '1' ? 'checked' : '' }}>
<label for="show_action">{{__('Action')}}</label>
</div>
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_weight" value="0">
<input id="show_weight" class="delete-checkbox-item multi-delete" type="checkbox"
name="show_weight" value="1"
{{ optional($product_setting?->modules)['show_weight'] === '1' ? 'checked' : '' }}>
<label for="show_weight">{{__('Weight')}}</label>
</div>
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_warranty" value="0">
<input id="show_warranty" class="delete-checkbox-item multi-delete" type="checkbox"
name="show_warranty" value="1"
{{ optional($product_setting?->modules)['show_warranty'] === '1' ? 'checked' : '' }}>
<label for="show_warranty">{{__('Warranty')}}</label>
</div>
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_guarantee" value="0">
<input id="show_guarantee" class="delete-checkbox-item multi-delete" type="checkbox"
name="show_guarantee" value="1"
{{ optional($product_setting?->modules)['show_guarantee'] === '1' ? 'checked' : '' }}>
<label for="show_guarantee">{{__('Guarantee')}}</label>
</div>
@if (moduleCheck('SerialCodeAddon'))
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_serial" value="0">
<input id="show_serial" class="delete-checkbox-item multi-delete" type="checkbox" name="show_serial" value="1"
{{ optional($product_setting?->modules)['show_serial'] === '1' ? 'checked' : '' }}>
<label for="show_serial">{{ __('Serial') }}</label>
</div>
@endif
</div>
<div class="col-lg-3">
<h3 class="title">{{ __('Additional Product Field') }}
<svg class="svg" width="16" height="17" viewBox="0 0 16 17" fill="none"
xmlns="http://www.w3.org/2000/svg">
<g opacity="0.8">
<path
d="M7.99967 15.1615C11.6816 15.1615 14.6663 12.1767 14.6663 8.49479C14.6663 4.81289 11.6816 1.82812 7.99967 1.82812C4.31778 1.82812 1.33301 4.81289 1.33301 8.49479C1.33301 12.1767 4.31778 15.1615 7.99967 15.1615Z"
fill="#97979F" stroke="#97979F" stroke-width="1.5" stroke-linecap="round"
stroke-linejoin="round" />
<path d="M8 5.82812V8.49479" stroke="white" stroke-width="1.5" stroke-linecap="round"
stroke-linejoin="round" />
<path d="M8 11.1719H8.00833" stroke="white" stroke-width="1.5" stroke-linecap="round"
stroke-linejoin="round" />
</g>
</svg>
</h3>
<h6>{{ __('MRP/PRICE') }}</h6>
<div class="additional-input">
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_product_sale_price" value="0">
<input id="mrp" type="checkbox" class="delete-checkbox-item multi-delete"
name="show_product_sale_price" value="1"
{{ is_null($product_setting) || is_null($product_setting->modules) || (optional($product_setting->modules)['show_product_sale_price'] ?? false) ? 'checked' : '' }}>
<label for="mrp">{{__('MRP')}}</label>
</div>
<input type="number" class="form-control additional-input-field" name="default_sale_price"
value="{{ optional($product_setting)->modules['default_sale_price'] ?? '' }}"
min="0" step="1" placeholder="{{ __('Enter Sale Price') }}">
</div>
<div class="additional-input">
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_product_wholesale_price" value="0">
<input id="wholesale" type="checkbox" class="delete-checkbox-item multi-delete"
name="show_product_wholesale_price" value="1"
{{ optional($product_setting?->modules)['show_product_wholesale_price'] === '1' ? 'checked' : '' }}>
<label for="wholesale">{{__('Wholesale Price')}}</label>
</div>
<input type="number" class="form-control additional-input-field"
name="default_wholesale_price"
value="{{ optional($product_setting)->modules['default_wholesale_price'] ?? '' }}"
min="0" step="1" placeholder="{{ __('Enter Wholesale Price') }}">
</div>
<div class="additional-input">
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_product_dealer_price" value="0">
<input id="dealer" type="checkbox" class="delete-checkbox-item multi-delete"
name="show_product_dealer_price" value="1"
{{ optional($product_setting?->modules)['show_product_dealer_price'] === '1' ? 'checked' : '' }}>
<label for="dealer">{{__('Dealer Price')}}</label>
</div>
<input type="number" class="form-control additional-input-field" name="default_dealer_price"
value="{{ optional($product_setting)->modules['default_dealer_price'] ?? '' }}"
min="0" step="1" placeholder="{{ __('Enter Dealer Price') }}">
</div>
<h6>{{ __('Batch Tracking') }}</h6>
<div class="additional-input">
<div class="d-flex align-items-center mb-2">
<input type="hidden" name="show_batch_no" value="0">
<input id="batch" type="checkbox" class="delete-checkbox-item multi-delete"
name="show_batch_no" value="1"
{{ optional($product_setting?->modules)['show_batch_no'] === '1' ? 'checked' : '' }}>
<label for="batch">{{__('Batch No')}}</label>
</div>
<input type="text" class="form-control additional-input-field" name="default_batch_no"
value="{{ optional($product_setting)->modules['default_batch_no'] ?? '' }}"
placeholder="{{ __('Batch No') }}">
</div>
{{-- Expiry Date --}}
<div class="additional-input">
<div class="d-flex align-items-center mb-2">
<input type="hidden" name="show_expire_date" value="0">
<input id="expiry" type="checkbox" class="delete-checkbox-item multi-delete"
name="show_expire_date" value="1"
{{ optional($product_setting?->modules)['show_expire_date'] === '1' ? 'checked' : '' }}>
<label for="expiry">{{__('Expiry Date')}}</label>
</div>
<div>
<select class="form-select date-type-selector" data-target="expired"
name="expire_date_type">
<option value="">{{__('Select')}}</option>
<option value="dmy"
{{ optional($product_setting->modules ?? null)['expire_date_type'] == 'dmy' ? 'selected' : '' }}>
{{__('Day / Month / Year')}}</option>
<option value="my"
{{ optional($product_setting->modules ?? null)['expire_date_type'] == 'my' ? 'selected' : '' }}>
{{__('Month / Year')}}
</option>
</select>
</div>
<div class="expired-inputs">
<input type="date" id="expired_dmy" name="default_expired_date_dmy"
value="{{ optional($product_setting->modules ?? null)['expire_date_type'] == 'dmy' ? optional($product_setting->modules)['default_expired_date'] : '' }}"
class="form-control expired-dmy"
style="{{ optional($product_setting->modules ?? null)['expire_date_type'] == 'dmy' ? '' : 'display:none;' }}">
<input type="month" id="expired_my" name="default_expired_date_my"
value="{{ optional($product_setting->modules ?? null)['expire_date_type'] == 'my' ? optional($product_setting->modules)['default_expired_date'] : '' }}"
class="form-control expired-my"
style="{{ optional($product_setting->modules ?? null)['expire_date_type'] == 'my' ? '' : 'display:none;' }}">
</div>
</div>
{{-- MFG Date --}}
<div class="additional-input">
<div class="d-flex align-items-center mb-2">
<input type="hidden" name="show_mfg_date" value="0">
<input id="mfg" type="checkbox" class="delete-checkbox-item multi-delete"
name="show_mfg_date" value="1"
{{ optional($product_setting?->modules)['show_mfg_date'] === '1' ? 'checked' : '' }}>
<label for="mfg">{{__('Mfg Date')}}</label>
</div>
<div>
<select class="form-select date-type-selector" data-target="mfg" name="mfg_date_type">
<option value="">{{__('Select') }}</option>
<option value="dmy"
{{ optional($product_setting->modules ?? null)['mfg_date_type'] == 'dmy' ? 'selected' : '' }}>
{{__('Day / Month / Year')}}
</option>
<option value="my"
{{ optional($product_setting->modules ?? null)['mfg_date_type'] == 'my' ? 'selected' : '' }}>
{{__('Month / Year')}}
</option>
</select>
</div>
<div class="mfg-inputs">
<input type="date" id="mfg_dmy" name="default_mfg_date_dmy"
value="{{ optional($product_setting->modules ?? null)['mfg_date_type'] == 'dmy' ? optional($product_setting->modules)['default_mfg_date'] : '' }}"
class="form-control mfg-dmy"
style="{{ optional($product_setting->modules ?? null)['mfg_date_type'] == 'dmy' ? '' : 'display:none;' }}">
<input type="month" id="mfg_my" name="default_mfg_date_my"
value="{{ optional($product_setting->modules ?? null)['mfg_date_type'] == 'my' ? optional($product_setting->modules)['default_mfg_date'] : '' }}"
class="form-control mfg-my"
style="{{ optional($product_setting->modules ?? null)['mfg_date_type'] == 'my' ? '' : 'display:none;' }}">
</div>
</div>
<h6>{{ __('Product Type') }}</h6>
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_product_type_single" value="0">
<input id="single" class="delete-checkbox-item multi-delete" type="checkbox"
name="show_product_type_single" value="1"
{{ is_null($product_setting) || is_null($product_setting->modules) || (optional($product_setting->modules)['show_product_type_single'] ?? false) ? 'checked' : '' }}>
<label for="single">
{{__('Single')}}
</label>
</div>
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_product_type_variant" value="0">
<input id="variant" class="delete-checkbox-item multi-delete" type="checkbox"
name="show_product_type_variant" value="1"
{{ optional($product_setting?->modules)['show_product_type_variant'] === '1' ? 'checked' : '' }}>
<label for="variant">{{__('Variant')}}</label>
</div>
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_product_type_combo" value="0">
<input id="combo" class="delete-checkbox-item multi-delete" type="checkbox"
name="show_product_type_combo" value="1"
{{ optional($product_setting?->modules)['show_product_type_combo'] === '1' ? 'checked' : '' }}>
<label for="combo">{{__('Combo')}}</label>
</div>
</div>
<div class="col-lg-3">
<h3 class="title">{{ __('Purchase Setting') }}
<svg class="svg" width="16" height="17" viewBox="0 0 16 17" fill="none"
xmlns="http://www.w3.org/2000/svg">
<g opacity="0.8">
<path
d="M7.99967 15.1615C11.6816 15.1615 14.6663 12.1767 14.6663 8.49479C14.6663 4.81289 11.6816 1.82812 7.99967 1.82812C4.31778 1.82812 1.33301 4.81289 1.33301 8.49479C1.33301 12.1767 4.31778 15.1615 7.99967 15.1615Z"
fill="#97979F" stroke="#97979F" stroke-width="1.5" stroke-linecap="round"
stroke-linejoin="round" />
<path d="M8 5.82812V8.49479" stroke="white" stroke-width="1.5" stroke-linecap="round"
stroke-linejoin="round" />
<path d="M8 11.1719H8.00833" stroke="white" stroke-width="1.5" stroke-linecap="round"
stroke-linejoin="round" />
</g>
</svg>
</h3>
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_product_batch_no" value="0">
<input id="batch_no" type="checkbox" class="delete-checkbox-item multi-delete"
name="show_product_batch_no" value="1"
{{ optional($product_setting?->modules)['show_product_batch_no'] === '1' ? 'checked' : '' }}>
<label for="batch_no">{{ __('Batch No') }}</label>
</div>
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="show_product_expire_date" value="0">
<input id="expire" type="checkbox" class="delete-checkbox-item multi-delete"
name="show_product_expire_date" value="1"
{{ optional($product_setting?->modules)['show_product_expire_date'] === '1' ? 'checked' : '' }}>
<label for="expire">{{ __('Expire Date') }}</label>
</div>
</div>
<div class="col-lg-3">
<h3 class="title">{{ __('Sale Setting') }}
<svg class="svg" width="16" height="17" viewBox="0 0 16 17" fill="none"
xmlns="http://www.w3.org/2000/svg">
<g opacity="0.8">
<path
d="M7.99967 15.1615C11.6816 15.1615 14.6663 12.1767 14.6663 8.49479C14.6663 4.81289 11.6816 1.82812 7.99967 1.82812C4.31778 1.82812 1.33301 4.81289 1.33301 8.49479C1.33301 12.1767 4.31778 15.1615 7.99967 15.1615Z"
fill="#97979F" stroke="#97979F" stroke-width="1.5" stroke-linecap="round"
stroke-linejoin="round" />
<path d="M8 5.82812V8.49479" stroke="white" stroke-width="1.5" stroke-linecap="round"
stroke-linejoin="round" />
<path d="M8 11.1719H8.00833" stroke="white" stroke-width="1.5" stroke-linecap="round"
stroke-linejoin="round" />
</g>
</svg>
</h3>
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="allow_due_sale" value="0">
<input id="allow_due_sale" type="checkbox" class="delete-checkbox-item multi-delete"
name="allow_due_sale" value="1"
{{ optional($product_setting?->modules)['allow_due_sale'] === '1' ? 'checked' : '' }}>
<label for="allow_due_sale">{{ __('Guest Due Sale') }}</label>
</div>
<div class="d-flex align-items-center mb-3">
<input type="hidden" name="allow_product_discount" value="0">
<input id="allow_product_discount" type="checkbox" class="delete-checkbox-item multi-delete"
name="allow_product_discount" value="1"
{{ optional($product_setting?->modules)['allow_product_discount'] === '1' ? 'checked' : '' }}>
<label for="allow_product_discount">{{ __('Product Discount') }}</label>
</div>
</div>
<div class="col-lg-12">
<div class="text-center mt-5">
<button type="submit" class="theme-btn m-2 submit-btn">{{ __('Update') }}</button>
</div>
</div>
</div>
</form>
</div>
</div>