diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 463e3b07c39..3ad356d02e5 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -997,7 +997,7 @@ class Expedition extends CommonObject $linebatch = new ExpeditionLineBatch($this->db); $ret = $linebatch->fetchFromStock($value['id_batch']); // load serial, sellby, eatby if ($ret < 0) { - $this->error = $linebatch->error; + $this->setErrorsFromObject($linebatch); return -1; } $linebatch->qty = $value['q']; @@ -1038,6 +1038,7 @@ class Expedition extends CommonObject $this->lines[$num] = $line; return 1; } + return 0; } /**