diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index 97075ddd440..5d971c0e440 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -638,21 +638,21 @@ class Mo extends CommonObject $oldQty = $this->oldQty; $newQty = $this->qty; - if($newQty != $oldQty && !empty($this->oldQty)) { + 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) { + if ($resql) { while ($obj = $this->db->fetch_object($resql)) { $moLine = new MoLine($this->db); $res = $moLine->fetch($obj->rowid); - if(!$res) $error++; + if (!$res) $error++; - if($moLine->role == 'toconsume' || $moLine->role == 'toproduce') { + if ($moLine->role == 'toconsume' || $moLine->role == 'toproduce') { if (empty($moLine->qty_frozen)) { $qty = $newQty * $moLine->qty / $oldQty; $moLine->qty = price2num($qty * (!empty($line->efficiency) ? $line->efficiency : 1 ), 'MS'); // Calculate with Qty to produce and more presition $res = $moLine->update($user); - if(!$res) $error++; + if (!$res) $error++; } } } diff --git a/htdocs/mrp/mo_card.php b/htdocs/mrp/mo_card.php index 8a460056a13..974e6eae4df 100644 --- a/htdocs/mrp/mo_card.php +++ b/htdocs/mrp/mo_card.php @@ -123,7 +123,7 @@ if (empty($reshook)) { $backurlforlist = dol_buildpath('/mrp/mo_list.php', 1); - $object->oldQty = $object->qty; + $object->oldQty = $object->qty; if (empty($backtopage) || ($cancel && empty($id))) { if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {