mirror of
https://github.com/grocy/grocy.git
synced 2025-08-18 03:25:50 +00:00
Made "Disable stock fulfillment checking for this ingredient" a default option per product (closes #182)
This commit is contained in:
@@ -46,7 +46,7 @@ Grocy.Components.ProductPicker.GetPicker().on('change', function(e)
|
||||
Grocy.Components.ProductCard.Refresh(productId);
|
||||
|
||||
Grocy.Api.Get('stock/products/' + productId,
|
||||
function (productDetails)
|
||||
function(productDetails)
|
||||
{
|
||||
if (!$("#only_check_single_unit_in_stock").is(":checked"))
|
||||
{
|
||||
@@ -66,6 +66,8 @@ Grocy.Components.ProductPicker.GetPicker().on('change', function(e)
|
||||
$("#amount").parent().find(".invalid-feedback").text(L('The amount cannot be lower than #1', '1'));
|
||||
}
|
||||
|
||||
$("#not_check_stock_fulfillment").prop("checked", productDetails.product.not_check_stock_fulfillment_for_recipes == 1);
|
||||
|
||||
$('#amount').focus();
|
||||
Grocy.FrontendHelpers.ValidateForm('recipe-pos-form');
|
||||
},
|
||||
|
Reference in New Issue
Block a user