diff --git a/public/viewjs/consume.js b/public/viewjs/consume.js index 34ab00a1..fdf114e1 100644 --- a/public/viewjs/consume.js +++ b/public/viewjs/consume.js @@ -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); } diff --git a/public/viewjs/inventory.js b/public/viewjs/inventory.js index 59cd1cbf..a2509295 100644 --- a/public/viewjs/inventory.js +++ b/public/viewjs/inventory.js @@ -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); } diff --git a/public/viewjs/purchase.js b/public/viewjs/purchase.js index ab78c9e9..0bcc7002 100644 --- a/public/viewjs/purchase.js +++ b/public/viewjs/purchase.js @@ -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); } diff --git a/public/viewjs/transfer.js b/public/viewjs/transfer.js index d0140a27..74126afc 100644 --- a/public/viewjs/transfer.js +++ b/public/viewjs/transfer.js @@ -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); }