Add amount to barcode created by the workflow InplaceAddBarcodeToExistingProduct on /purchase (closes #2085)

This commit is contained in:
Bernd Bestel
2022-12-29 11:21:33 +01:00
parent c934bfb7b3
commit efae0b193d
6 changed files with 12 additions and 9 deletions

View File

@@ -277,13 +277,13 @@ Grocy.Components.ProductPicker.GetPicker().on('change', function(e)
if (barcode != null)
{
if (barcode.amount != null && !barcode.amount.isEmpty())
if (barcode.amount != null)
{
$("#display_amount").val(barcode.amount);
$("#display_amount").select();
}
if (barcode.qu_id != null && !barcode.qu_id.isEmpty())
if (barcode.qu_id != null)
{
Grocy.Components.ProductAmountPicker.SetQuantityUnit(barcode.qu_id);
}