mirror of
https://github.com/grocy/grocy.git
synced 2026-04-07 05:16:15 +02:00
Don't add the destination QU multiple time in productamountpicker
This commit is contained in:
parent
4959e9e732
commit
7f600bd8d9
|
|
@ -17,7 +17,10 @@ Grocy.Components.ProductAmountPicker.Reload = function(productId, destinationQuI
|
||||||
factor = 1;
|
factor = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#qu_id").append('<option value="' + conversion.to_qu_id + '" data-qu-factor="' + factor + '">' + conversion.to_qu_name + '</option>');
|
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>');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user