Only cascade changes of stock QU to recipe ingredients which uses the same QU (references #177)

This commit is contained in:
Bernd Bestel
2019-09-17 16:01:30 +02:00
parent 74f9470769
commit 1b19940aba
2 changed files with 10 additions and 1 deletions

View File

@@ -52,7 +52,7 @@ Grocy.Components.ProductPicker.GetPicker().on('change', function(e)
function(productDetails)
{
Grocy.RecipePosFormProductChangeCount++;
console.log(Grocy.RecipePosFormProductChangeCount);
if (Grocy.RecipePosFormProductChangeCount < 3) // This triggers twice on inital page load, however
{
Grocy.Components.ProductAmountPicker.Reload(productDetails.product.id, productDetails.quantity_unit_stock.id, true);