Don't apply the barocde qu_id if empty (fixes #1619)

This commit is contained in:
Bernd Bestel
2021-09-19 10:07:25 +02:00
parent 5563e7ed4c
commit 6175afa6be
4 changed files with 4 additions and 4 deletions

View File

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

View File

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

View File

@@ -349,7 +349,7 @@ if (Grocy.Components.ProductPicker !== undefined)
$("#display_amount").select();
}
if (barcode.qu_id != null)
if (barcode.qu_id != null && !barcode.qu_id.isEmpty())
{
Grocy.Components.ProductAmountPicker.SetQuantityUnit(barcode.qu_id);
}

View File

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