2018-11-21 19:08:36 +01:00
@ extends ( 'layout.default' )
2019-05-01 20:19:18 +02:00
@ section ( 'title' , $__t ( 'Stock settings' ))
2018-11-21 19:08:36 +01:00
@ section ( 'viewJsName' , 'stocksettings' )
@ section ( 'content' )
2020-04-19 08:51:02 -04:00
< div class = " row " >
< div class = " col " >
< h2 class = " title " >@ yield ( 'title' ) </ h2 >
</ div >
</ div >
2020-10-31 18:37:10 +01:00
2020-11-08 15:09:10 +01:00
< hr class = " my-2 " >
2020-10-31 18:37:10 +01:00
2018-11-21 19:08:36 +01:00
< div class = " row " >
2021-06-24 22:46:47 +02:00
< div class = " col-lg-6 col-12 " >
2018-11-21 19:08:36 +01:00
< div id = " productpresets " >
2019-05-01 20:19:18 +02:00
< h4 > {{ $__t ( 'Presets for new products' ) }} </ h4 >
2018-11-21 19:08:36 +01:00
2019-09-19 17:46:52 +02:00
@ if ( GROCY_FEATURE_FLAG_STOCK_LOCATION_TRACKING )
2018-11-21 19:08:36 +01:00
< div class = " form-group " >
2019-05-01 20:19:18 +02:00
< label for = " product_presets_location_id " > {{ $__t ( 'Location' ) }} </ label >
2020-11-16 19:10:29 +01:00
< select class = " custom-control custom-select user-setting-control "
2020-08-31 20:32:50 +02:00
id = " product_presets_location_id "
data - setting - key = " product_presets_location_id " >
2018-11-21 19:08:36 +01:00
< option value = " -1 " ></ option >
@ foreach ( $locations as $location )
2020-08-31 20:32:50 +02:00
< option value = " { { $location->id }} " > {{ $location -> name }} </ option >
2018-11-21 19:08:36 +01:00
@ endforeach
</ select >
</ div >
2019-09-19 17:46:52 +02:00
@ endif
2018-11-21 19:08:36 +01:00
< div class = " form-group " >
2019-05-01 20:19:18 +02:00
< label for = " product_presets_product_group_id " > {{ $__t ( 'Product group' ) }} </ label >
2020-11-16 19:10:29 +01:00
< select class = " custom-control custom-select user-setting-control "
2020-08-31 20:32:50 +02:00
id = " product_presets_product_group_id "
data - setting - key = " product_presets_product_group_id " >
2018-11-21 19:08:36 +01:00
< option value = " -1 " ></ option >
@ foreach ( $productGroups as $productGroup )
2020-08-31 20:32:50 +02:00
< option value = " { { $productGroup->id }} " > {{ $productGroup -> name }} </ option >
2018-11-21 19:08:36 +01:00
@ endforeach
</ select >
</ div >
< div class = " form-group " >
2019-05-01 20:19:18 +02:00
< label for = " product_presets_qu_id " > {{ $__t ( 'Quantity unit' ) }} </ label >
2020-11-16 19:10:29 +01:00
< select class = " custom-control custom-select user-setting-control "
2020-08-31 20:32:50 +02:00
id = " product_presets_qu_id "
data - setting - key = " product_presets_qu_id " >
2018-11-21 19:08:36 +01:00
< option value = " -1 " ></ option >
@ foreach ( $quantityunits as $quantityunit )
2020-08-31 20:32:50 +02:00
< option value = " { { $quantityunit->id }} " > {{ $quantityunit -> name }} </ option >
2018-11-21 19:08:36 +01:00
@ endforeach
</ select >
</ div >
2021-11-13 17:05:23 +01:00
@ include ( 'components.numberpicker' , array (
'id' => 'product_presets_default_due_days' ,
'additionalAttributes' => 'data-setting-key="product_presets_default_due_days"' ,
'label' => 'Default due days' ,
'min' => - 1 ,
'additionalCssClasses' => 'user-setting-control'
))
2022-02-07 19:12:31 +01:00
@ if ( GROCY_FEATURE_FLAG_STOCK_PRODUCT_OPENED_TRACKING )
< div class = " form-group " >
< div class = " custom-control custom-checkbox " >
< input type = " checkbox "
class = " form-check-input custom-control-input user-setting-control "
id = " product_presets_treat_opened_as_out_of_stock "
data - setting - key = " product_presets_treat_opened_as_out_of_stock " >
< label class = " form-check-label custom-control-label "
for = " product_presets_treat_opened_as_out_of_stock " >
{{ $__t ( 'Treat opened as out of stock' ) }}
</ label >
</ div >
</ div >
@ endif
2018-11-21 19:08:36 +01:00
</ div >
2019-05-01 20:19:18 +02:00
< h4 class = " mt-2 " > {{ $__t ( 'Stock overview' ) }} </ h4 >
2019-04-20 15:30:45 +02:00
@ include ( 'components.numberpicker' , array (
2020-11-15 19:53:44 +01:00
'id' => 'stock_due_soon_days' ,
'additionalAttributes' => 'data-setting-key="stock_due_soon_days"' ,
'label' => 'Due soon days' ,
2020-08-31 20:32:50 +02:00
'min' => 1 ,
'additionalCssClasses' => 'user-setting-control'
2019-04-20 15:30:45 +02:00
))
2020-11-08 15:09:10 +01:00
< div class = " form-group " >
2020-11-12 21:35:10 +01:00
< div class = " custom-control custom-checkbox " >
< input type = " checkbox "
class = " form-check-input custom-control-input user-setting-control "
id = " show_icon_on_stock_overview_page_when_product_is_on_shopping_list "
data - setting - key = " show_icon_on_stock_overview_page_when_product_is_on_shopping_list " >
< label class = " form-check-label custom-control-label "
for = " show_icon_on_stock_overview_page_when_product_is_on_shopping_list " >
{{ $__t ( 'Show an icon if the product is already on the shopping list' ) }}
2020-11-08 15:09:10 +01:00
</ label >
</ div >
</ div >
2019-05-04 13:19:34 +02:00
< h4 class = " mt-2 " > {{ $__t ( 'Purchase' ) }} </ h4 >
@ include ( 'components.numberpicker' , array (
2020-08-31 20:32:50 +02:00
'id' => 'stock_default_purchase_amount' ,
'additionalAttributes' => 'data-setting-key="stock_default_purchase_amount"' ,
'label' => 'Default amount for purchase' ,
2020-11-17 19:11:02 +01:00
'min' => '0.' ,
2020-10-20 13:08:54 -05:00
'decimals' => $userSettings [ 'stock_decimal_places_amounts' ],
2020-11-15 14:15:09 +01:00
'additionalCssClasses' => 'user-setting-control locale-number-input locale-number-quantity-amount' ,
2019-05-04 13:19:34 +02:00
))
2020-11-08 15:09:10 +01:00
< div class = " form-group " >
2020-11-12 21:35:10 +01:00
< div class = " custom-control custom-checkbox " >
< input type = " checkbox "
class = " form-check-input custom-control-input user-setting-control "
id = " show_purchased_date_on_purchase "
data - setting - key = " show_purchased_date_on_purchase " >
< label class = " form-check-label custom-control-label "
for = " show_purchased_date_on_purchase " >
{{ $__t ( 'Show purchased date on purchase and inventory page (otherwise the purchased date defaults to today)' ) }}
2020-11-08 15:09:10 +01:00
</ label >
</ div >
</ div >
2020-11-14 23:15:34 +01:00
< div class = " form-group " >
< div class = " custom-control custom-checkbox " >
< input type = " checkbox "
class = " form-check-input custom-control-input user-setting-control "
2020-11-15 19:53:44 +01:00
id = " show_warning_on_purchase_when_due_date_is_earlier_than_next "
data - setting - key = " show_warning_on_purchase_when_due_date_is_earlier_than_next " >
2020-11-14 23:15:34 +01:00
< label class = " form-check-label custom-control-label "
2020-11-15 19:53:44 +01:00
for = " show_warning_on_purchase_when_due_date_is_earlier_than_next " >
{{ $__t ( 'Show a warning when the due date of the purchased product is earlier than the next due date in stock' ) }}
2020-11-14 23:15:34 +01:00
</ label >
</ div >
</ div >
2019-05-04 13:19:34 +02:00
< h4 class = " mt-2 " > {{ $__t ( 'Consume' ) }} </ h4 >
@ include ( 'components.numberpicker' , array (
2020-08-31 20:32:50 +02:00
'id' => 'stock_default_consume_amount' ,
'additionalAttributes' => 'data-setting-key="stock_default_consume_amount"' ,
'label' => 'Default amount for consume' ,
2020-10-19 20:03:26 +02:00
'min' => 0 ,
2020-10-20 13:08:54 -05:00
'decimals' => $userSettings [ 'stock_decimal_places_amounts' ],
2020-12-04 18:16:58 +01:00
'additionalCssClasses' => 'user-setting-control locale-number-input locale-number-quantity-amount' ,
'additionalGroupCssClasses' => 'mb-0'
2019-05-04 13:19:34 +02:00
))
2020-12-04 18:16:58 +01:00
< div class = " form-group " >
< div class = " custom-control custom-checkbox " >
< input type = " checkbox "
class = " form-check-input custom-control-input user-setting-control "
id = " stock_default_consume_amount_use_quick_consume_amount "
data - setting - key = " stock_default_consume_amount_use_quick_consume_amount " >
< label class = " form-check-label custom-control-label "
for = " stock_default_consume_amount_use_quick_consume_amount " >
{{ $__t ( 'Use the products "Quick consume amount"' ) }}
</ label >
</ div >
</ div >
2020-10-20 13:08:54 -05:00
< h4 class = " mt-2 " > {{ $__t ( 'Common' ) }} </ h4 >
@ include ( 'components.numberpicker' , array (
2020-10-20 20:38:19 +02:00
'id' => 'stock_decimal_places_amounts' ,
'additionalAttributes' => 'data-setting-key="stock_decimal_places_amounts"' ,
2020-10-20 13:08:54 -05:00
'label' => 'Decimal places allowed for amounts' ,
'min' => 0 ,
'additionalCssClasses' => 'user-setting-control'
))
2020-12-22 16:24:13 +01:00
@ if ( GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING )
2020-10-20 13:08:54 -05:00
@ include ( 'components.numberpicker' , array (
2020-10-20 20:38:19 +02:00
'id' => 'stock_decimal_places_prices' ,
'additionalAttributes' => 'data-setting-key="stock_decimal_places_prices"' ,
2020-10-20 13:08:54 -05:00
'label' => 'Decimal places allowed for prices' ,
'min' => 0 ,
'additionalCssClasses' => 'user-setting-control'
))
2021-07-13 19:29:23 +02:00
< div class = " form-group mt-n3 " >
< div class = " custom-control custom-checkbox " >
< input type = " checkbox "
class = " form-check-input custom-control-input user-setting-control "
id = " stock_auto_decimal_separator_prices "
data - setting - key = " stock_auto_decimal_separator_prices " >
< label class = " form-check-label custom-control-label "
for = " stock_auto_decimal_separator_prices " >
{{ $__t ( 'Add decimal separator automatically for price inputs' ) }}
2022-04-04 20:10:29 +02:00
< i class = " fa-solid fa-question-circle text-muted "
2021-07-13 19:29:23 +02:00
data - toggle = " tooltip "
data - trigger = " hover click "
title = " { { $__t ('When enabled, you always have to enter the value including decimal places, the decimal separator will be automatically added based on the amount of allowed decimal places') }} " ></ i >
</ label >
</ div >
</ div >
2020-12-22 16:24:13 +01:00
@ endif
2020-10-20 13:08:54 -05:00
2020-08-31 20:32:50 +02:00
< a href = " { { $U ('/stockoverview') }} "
class = " btn btn-success " > {{ $__t ( 'OK' ) }} </ a >
2018-11-21 19:08:36 +01:00
</ div >
</ div >
@ stop