Standardize code with reception (option to allow negative shipment)

This commit is contained in:
Laurent Destailleur 2022-11-22 13:47:01 +01:00
parent ba1f82b354
commit 3d8404ecb3

View File

@ -740,7 +740,8 @@ 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);