mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Added a new product preset for default_stock_label_type (closes #2445)
This commit is contained in:
@@ -22,6 +22,7 @@
|
|||||||
- Product barcode matching is now case-insensitive
|
- Product barcode matching is now case-insensitive
|
||||||
- Added a new column "Product picture" on the products list (master data) page (hidden by default)
|
- Added a new column "Product picture" on the products list (master data) page (hidden by default)
|
||||||
- Optimized that when navigation between the different "Group by"-variants on the stock report "Spendings", the selected date range now remains persistent
|
- Optimized that when navigation between the different "Group by"-variants on the stock report "Spendings", the selected date range now remains persistent
|
||||||
|
- Added a new "Presets for new products" stock setting for the "Default stock entry label" option of new products
|
||||||
- Fixed that a once set quantity unit on a product barcode could not be removed on edit
|
- Fixed that a once set quantity unit on a product barcode could not be removed on edit
|
||||||
- Fixed that when consuming a specific stock entry which is opened, and which originated from a before partly opened stock entry, the unopened one was wrongly consume instead
|
- Fixed that when consuming a specific stock entry which is opened, and which originated from a before partly opened stock entry, the unopened one was wrongly consume instead
|
||||||
|
|
||||||
|
@@ -180,6 +180,7 @@ DefaultUserSetting('product_presets_product_group_id', -1); // Default product g
|
|||||||
DefaultUserSetting('product_presets_qu_id', -1); // Default quantity unit id for new products (-1 means no quantity unit is preset)
|
DefaultUserSetting('product_presets_qu_id', -1); // Default quantity unit id for new products (-1 means no quantity unit is preset)
|
||||||
DefaultUserSetting('product_presets_default_due_days', 0); // Default due days for new products (-1 means that the product will be never overdue)
|
DefaultUserSetting('product_presets_default_due_days', 0); // Default due days for new products (-1 means that the product will be never overdue)
|
||||||
DefaultUserSetting('product_presets_treat_opened_as_out_of_stock', true); // Default "Treat opened as out of stock" option for new products
|
DefaultUserSetting('product_presets_treat_opened_as_out_of_stock', true); // Default "Treat opened as out of stock" option for new products
|
||||||
|
DefaultUserSetting('product_presets_default_stock_label_type', 0); // "Default stock entry label" option for new products (0 = No label, 1 = Single Label, 2 = Label per unit)
|
||||||
DefaultUserSetting('stock_decimal_places_amounts', 4); // Default decimal places allowed for amounts
|
DefaultUserSetting('stock_decimal_places_amounts', 4); // Default decimal places allowed for amounts
|
||||||
DefaultUserSetting('stock_decimal_places_prices_input', 2); // Default decimal places allowed for prices (input)
|
DefaultUserSetting('stock_decimal_places_prices_input', 2); // Default decimal places allowed for prices (input)
|
||||||
DefaultUserSetting('stock_decimal_places_prices_display', 2); // Default decimal places allowed for prices (display)
|
DefaultUserSetting('stock_decimal_places_prices_display', 2); // Default decimal places allowed for prices (display)
|
||||||
|
@@ -493,6 +493,11 @@ else if (Grocy.EditMode === 'create')
|
|||||||
{
|
{
|
||||||
$("#treat_opened_as_out_of_stock").prop("checked", BoolVal(Grocy.UserSettings.product_presets_treat_opened_as_out_of_stock));
|
$("#treat_opened_as_out_of_stock").prop("checked", BoolVal(Grocy.UserSettings.product_presets_treat_opened_as_out_of_stock));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Grocy.FeatureFlags.GROCY_FEATURE_FLAG_LABEL_PRINTER)
|
||||||
|
{
|
||||||
|
$("#default_stock_label_type").val(Grocy.UserSettings.product_presets_default_stock_label_type);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Grocy.Components.ProductPicker.GetPicker().on('change', function(e)
|
Grocy.Components.ProductPicker.GetPicker().on('change', function(e)
|
||||||
|
@@ -6,6 +6,10 @@ if (Grocy.FeatureFlags.GROCY_FEATURE_FLAG_STOCK_PRODUCT_OPENED_TRACKING && BoolV
|
|||||||
{
|
{
|
||||||
$("#product_presets_treat_opened_as_out_of_stock").prop("checked", true);
|
$("#product_presets_treat_opened_as_out_of_stock").prop("checked", true);
|
||||||
}
|
}
|
||||||
|
if (Grocy.FeatureFlags.GROCY_FEATURE_FLAG_LABEL_PRINTER)
|
||||||
|
{
|
||||||
|
$("#product_presets_default_stock_label_type").val(Grocy.UserSettings.product_presets_default_stock_label_type);
|
||||||
|
}
|
||||||
$("#stock_due_soon_days").val(Grocy.UserSettings.stock_due_soon_days);
|
$("#stock_due_soon_days").val(Grocy.UserSettings.stock_due_soon_days);
|
||||||
$("#stock_default_purchase_amount").val(Grocy.UserSettings.stock_default_purchase_amount);
|
$("#stock_default_purchase_amount").val(Grocy.UserSettings.stock_default_purchase_amount);
|
||||||
$("#stock_default_consume_amount").val(Grocy.UserSettings.stock_default_consume_amount);
|
$("#stock_default_consume_amount").val(Grocy.UserSettings.stock_default_consume_amount);
|
||||||
|
@@ -76,6 +76,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
@if(GROCY_FEATURE_FLAG_LABEL_PRINTER)
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="product_presets_default_stock_label_type">{{ $__t('Default stock entry label') }}</label>
|
||||||
|
<select class="custom-control custom-select user-setting-control"
|
||||||
|
id="product_presets_default_stock_label_type"
|
||||||
|
data-setting-key="product_presets_default_stock_label_type">
|
||||||
|
<option value="0">{{ $__t('No label') }}</option>
|
||||||
|
<option value="1">{{ $__t('Single label') }}</option>
|
||||||
|
<option value="2">{{ $__t('Label per unit') }}</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4 class="mt-2">{{ $__t('Stock overview') }}</h4>
|
<h4 class="mt-2">{{ $__t('Stock overview') }}</h4>
|
||||||
|
Reference in New Issue
Block a user