mirror of
https://github.com/grocy/grocy.git
synced 2025-10-16 18:25:10 +00:00
Fixed recipeposform initial product quantity unit was not set
This commit is contained in:
@@ -73,7 +73,7 @@ $(".input-group-productamountpicker").on("change", function()
|
|||||||
var amount = $("#display_amount").val();
|
var amount = $("#display_amount").val();
|
||||||
var destinationAmount = amount / quFactor;
|
var destinationAmount = amount / quFactor;
|
||||||
|
|
||||||
if (destinationQuName == selectedQuName || Grocy.Components.ProductAmountPicker.AllowAnyQuEnabled)
|
if (destinationQuName == selectedQuName || Grocy.Components.ProductAmountPicker.AllowAnyQuEnabled || amount.toString().isEmpty() || selectedQuName.toString().isEmpty())
|
||||||
{
|
{
|
||||||
$("#qu-conversion-info").addClass("d-none");
|
$("#qu-conversion-info").addClass("d-none");
|
||||||
}
|
}
|
||||||
|
@@ -79,6 +79,8 @@ Grocy.Components.ProductPicker.GetPicker().on('change', function(e)
|
|||||||
|
|
||||||
$("#not_check_stock_fulfillment").prop("checked", productDetails.product.not_check_stock_fulfillment_for_recipes == 1);
|
$("#not_check_stock_fulfillment").prop("checked", productDetails.product.not_check_stock_fulfillment_for_recipes == 1);
|
||||||
|
|
||||||
|
Grocy.Components.ProductAmountPicker.SetQuantityUnit(productDetails.quantity_unit_stock.id);
|
||||||
|
|
||||||
$('#display_amount').focus();
|
$('#display_amount').focus();
|
||||||
Grocy.FrontendHelpers.ValidateForm('recipe-pos-form');
|
Grocy.FrontendHelpers.ValidateForm('recipe-pos-form');
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user