From a503a4dcc66723f7d0b6e6a239f7efe20c3efd2f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 23 Oct 2021 22:12:57 +0200 Subject: [PATCH] Fix scrutinizer --- htdocs/categories/class/categorie.class.php | 4 ---- htdocs/hrm/class/skill.class.php | 2 +- htdocs/mrp/mo_production.php | 4 +++- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 6691823ab6f..4f8c6b28d41 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -759,8 +759,6 @@ class Categorie extends CommonObject } return -1; } - - return 0; } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps @@ -816,8 +814,6 @@ class Categorie extends CommonObject $this->error = $this->db->lasterror(); return -1; } - - return 0; } /** diff --git a/htdocs/hrm/class/skill.class.php b/htdocs/hrm/class/skill.class.php index 45e9eb6701c..478b267ac1f 100644 --- a/htdocs/hrm/class/skill.class.php +++ b/htdocs/hrm/class/skill.class.php @@ -384,7 +384,7 @@ class Skill extends CommonObject /** * Load object lines in memory from the database * - * @return int | array <0 if KO, 0 if not found, array if OK + * @return array|int <0 if KO, 0 if not found, array if OK */ public function fetchLines() { diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php index 0e2edb81203..d7cc53cdc8b 100644 --- a/htdocs/mrp/mo_production.php +++ b/htdocs/mrp/mo_production.php @@ -284,7 +284,9 @@ if (empty($reshook)) { if (!$error && GETPOST('idwarehousetoproduce-'.$line->id.'-'.$i) > 0) { // Record stock movement $id_product_batch = 0; - $stockmove->origin = $object; + $stockmove->origin_type = $object->element; + $stockmove->origin_id = $object->id; + $idstockmove = $stockmove->reception($user, $line->fk_product, GETPOST('idwarehousetoproduce-'.$line->id.'-'.$i), $qtytoprocess, $pricetoprocess, $labelmovement, '', '', GETPOST('batchtoproduce-'.$line->id.'-'.$i), dol_now(), $id_product_batch, $codemovement); if ($idstockmove < 0) { $error++;