mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 09:39:57 +00:00
Added a new "Presets for new products" stock setting for the "Default due days" option of new products (closes #1552)
This commit is contained in:
parent
a6ffe8480a
commit
10bd5ce900
@ -1,6 +1,7 @@
|
|||||||
- The "Below min. stock amount" filter on the stock overview page now also includes due-soon, overdue or already expired products
|
- The "Below min. stock amount" filter on the stock overview page now also includes due-soon, overdue or already expired products
|
||||||
- The default shopping list (named "Shopping list"; localized) can now be renamed
|
- The default shopping list (named "Shopping list"; localized) can now be renamed
|
||||||
- Added the products average price as a (hidden by default) column on the stock overview page
|
- Added the products average price as a (hidden by default) column on the stock overview page
|
||||||
|
- Added a new "Presets for new products" stock setting for the "Default due days" option of new products
|
||||||
- Fixed that the "Stay logged in permanently" checkbox on the login page had no effect (thanks @0)
|
- Fixed that the "Stay logged in permanently" checkbox on the login page had no effect (thanks @0)
|
||||||
- Fixed that the labels of context-/more-menu items were not readable in Night Mode (thanks @corbolais)
|
- Fixed that the labels of context-/more-menu items were not readable in Night Mode (thanks @corbolais)
|
||||||
- Fixed that auto night mode over midnight did not always work
|
- Fixed that auto night mode over midnight did not always work
|
||||||
|
@ -146,6 +146,7 @@ DefaultUserSetting('keep_screen_on_when_fullscreen_card', false); // Keep the sc
|
|||||||
DefaultUserSetting('product_presets_location_id', -1); // Default location id for new products (-1 means no location is preset)
|
DefaultUserSetting('product_presets_location_id', -1); // Default location id for new products (-1 means no location is preset)
|
||||||
DefaultUserSetting('product_presets_product_group_id', -1); // Default product group id for new products (-1 means no product group is preset)
|
DefaultUserSetting('product_presets_product_group_id', -1); // Default product group id for new products (-1 means no product group 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_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('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', 2); // Default decimal places allowed for prices
|
DefaultUserSetting('stock_decimal_places_prices', 2); // Default decimal places allowed for prices
|
||||||
DefaultUserSetting('stock_auto_decimal_separator_prices', false);
|
DefaultUserSetting('stock_auto_decimal_separator_prices', false);
|
||||||
|
@ -504,6 +504,11 @@ else if (Grocy.EditMode === 'create')
|
|||||||
{
|
{
|
||||||
$("select.input-group-qu").val(Grocy.UserSettings.product_presets_qu_id);
|
$("select.input-group-qu").val(Grocy.UserSettings.product_presets_qu_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Grocy.UserSettings.product_presets_default_due_days.toString() !== '0')
|
||||||
|
{
|
||||||
|
$("#default_best_before_days").val(Grocy.UserSettings.product_presets_default_due_days);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Grocy.Components.ProductPicker.GetPicker().on('change', function(e)
|
Grocy.Components.ProductPicker.GetPicker().on('change', function(e)
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
$("#product_presets_location_id").val(Grocy.UserSettings.product_presets_location_id);
|
$("#product_presets_location_id").val(Grocy.UserSettings.product_presets_location_id);
|
||||||
$("#product_presets_product_group_id").val(Grocy.UserSettings.product_presets_product_group_id);
|
$("#product_presets_product_group_id").val(Grocy.UserSettings.product_presets_product_group_id);
|
||||||
$("#product_presets_qu_id").val(Grocy.UserSettings.product_presets_qu_id);
|
$("#product_presets_qu_id").val(Grocy.UserSettings.product_presets_qu_id);
|
||||||
|
$("#product_presets_default_due_days").val(Grocy.UserSettings.product_presets_default_due_days);
|
||||||
$("#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);
|
||||||
|
@ -55,6 +55,14 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@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'
|
||||||
|
))
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4 class="mt-2">{{ $__t('Stock overview') }}</h4>
|
<h4 class="mt-2">{{ $__t('Stock overview') }}</h4>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user