mirror of
https://github.com/grocy/grocy.git
synced 2025-08-17 19:16:37 +00:00
Don't add the destination QU multiple time in productamountpicker
This commit is contained in:
@@ -17,7 +17,10 @@ Grocy.Components.ProductAmountPicker.Reload = function(productId, destinationQuI
|
|||||||
factor = 1;
|
factor = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$('#qu_id option[value="' + conversion.to_qu_id + '"]').length) // Don't add the destination QU multiple times
|
||||||
|
{
|
||||||
$("#qu_id").append('<option value="' + conversion.to_qu_id + '" data-qu-factor="' + factor + '">' + conversion.to_qu_name + '</option>');
|
$("#qu_id").append('<option value="' + conversion.to_qu_id + '" data-qu-factor="' + factor + '">' + conversion.to_qu_name + '</option>');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user