mirror of
https://github.com/grocy/grocy.git
synced 2026-03-28 07:39:25 +01:00
Fixed recipeposform initial product quantity unit was not set
This commit is contained in:
parent
35388b798c
commit
06fe308f31
|
|
@ -73,7 +73,7 @@ $(".input-group-productamountpicker").on("change", function()
|
|||
var amount = $("#display_amount").val();
|
||||
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");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
Grocy.Components.ProductAmountPicker.SetQuantityUnit(productDetails.quantity_unit_stock.id);
|
||||
|
||||
$('#display_amount').focus();
|
||||
Grocy.FrontendHelpers.ValidateForm('recipe-pos-form');
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user