From 7f600bd8d96aff2463c7198908200ae8f96fb54b Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Tue, 10 Nov 2020 21:19:51 +0100 Subject: [PATCH] Don't add the destination QU multiple time in productamountpicker --- public/viewjs/components/productamountpicker.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/viewjs/components/productamountpicker.js b/public/viewjs/components/productamountpicker.js index 5884b357..8fb4f372 100644 --- a/public/viewjs/components/productamountpicker.js +++ b/public/viewjs/components/productamountpicker.js @@ -17,7 +17,10 @@ Grocy.Components.ProductAmountPicker.Reload = function(productId, destinationQuI factor = 1; } - $("#qu_id").append(''); + if (!$('#qu_id option[value="' + conversion.to_qu_id + '"]').length) // Don't add the destination QU multiple times + { + $("#qu_id").append(''); + } }); }