FIX : Travis

This commit is contained in:
Adrien Raze 2023-04-05 11:42:50 +02:00
parent 805d457be1
commit 2c90f7335e

View File

@ -638,8 +638,8 @@ class Mo extends CommonObject
$oldQty = $this->oldQty;
$newQty = $this->qty;
if($newQty != $oldQty) {
$sql = 'SELECT rowid FROM ' . MAIN_DB_PREFIX . 'mrp_production WHERE fk_mo = ' . $this->id;
if($newQty != $oldQty && !empty($this->oldQty)) {
$sql = 'SELECT rowid FROM ' . MAIN_DB_PREFIX . 'mrp_production WHERE fk_mo = ' . (int) $this->id;
$resql = $this->db->query($sql);
if($resql) {
while ($obj = $this->db->fetch_object($resql)) {