diff --git a/public/viewjs/recipeposform.js b/public/viewjs/recipeposform.js index da9ae5f4..1083b19a 100644 --- a/public/viewjs/recipeposform.js +++ b/public/viewjs/recipeposform.js @@ -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'); }, diff --git a/views/productform.blade.php b/views/productform.blade.php index baa02585..da5630f1 100644 --- a/views/productform.blade.php +++ b/views/productform.blade.php @@ -165,6 +165,18 @@ 'hintId' => 'tare_weight_qu_info' )) + @if(GROCY_FEATURE_FLAG_RECIPES) +
+
+ + not_check_stock_fulfillment_for_recipes == 1) checked @endif class="form-check-input" type="checkbox" id="not_check_stock_fulfillment_for_recipes" name="not_check_stock_fulfillment_for_recipes" value="1"> + +
+
+ @endif +