From b5dac0e5f57157889618aae554d3a80c025afebc Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Wed, 23 Nov 2022 08:26:12 +0100 Subject: [PATCH] merge --- htdocs/expedition/class/expedition.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index f258423108c..04849a72dd9 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -2162,7 +2162,7 @@ class Expedition extends CommonObject } else { $qty = $obj->edbqty; } - if ($qty <= 0) { + if ($qty <= 0 || ($qty < 0 && !getDolGlobalInt('SHIPMENT_ALLOW_NEGATIVE_QTY'))) { continue; } dol_syslog(get_class($this) . "::valid movement index " . $i . " ed.rowid=" . $obj->rowid . " edb.rowid=" . $obj->edbrowid);