From aa438e29be1e4cd58ea5224b6f758c3729f3b524 Mon Sep 17 00:00:00 2001 From: tnegre Date: Thu, 9 Jan 2025 17:30:07 +0100 Subject: [PATCH] fix: avoid duplicate lines in inventory --- htdocs/product/inventory/class/inventory.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/inventory/class/inventory.class.php b/htdocs/product/inventory/class/inventory.class.php index 890bce9870c..559ac2cd859 100644 --- a/htdocs/product/inventory/class/inventory.class.php +++ b/htdocs/product/inventory/class/inventory.class.php @@ -274,7 +274,7 @@ class Inventory extends CommonObject // Scan existing stock to prefill the inventory $sql = "SELECT ps.rowid, ps.fk_entrepot as fk_warehouse, ps.fk_product, ps.reel,"; if (isModEnabled('productbatch')) { - $sql .= " pb.batch as batch, pb.qty as qty,"; + $sql .= " COALESCE(pb.batch, '') as batch, pb.qty as qty,"; } else { $sql .= " '' as batch, 0 as qty,"; }