Merge pull request #32613 from Easya-Solutions/20_fix_batch_duplicate_lines

fix: avoid duplicate lines in inventory
This commit is contained in:
Laurent Destailleur 2025-01-10 12:23:34 +01:00 committed by GitHub
commit b3a280cced
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,";
}