From 21a3a6cc7a145398308a10bd8de4d8e434f4b478 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 23 Nov 2021 23:55:01 +0100 Subject: [PATCH] clean code --- htdocs/core/class/commonobject.class.php | 2 ++ htdocs/fichinter/class/fichinter.class.php | 17 ----------------- htdocs/product/card.php | 3 +-- 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 23d6e203bb5..ab988d11db2 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -8038,6 +8038,8 @@ abstract class CommonObject if ($ignoreerrors) { return true; // TODO Not enough. If there is A-B on kept product and B-C on old one, we must get A-B-C after merge. Not A-B. } + print $sql; + //$this->errors = $db->lasterror(); return false; } diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index af5801a48fb..297e03fa379 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -1374,23 +1374,6 @@ class Fichinter extends CommonObject return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables); } - - /** - * Function used to replace a product id with another one. - * - * @param DoliDB $db Database handler - * @param int $origin_id Old product id - * @param int $dest_id New product id - * @return bool - */ - public static function replaceProduct(DoliDB $db, $origin_id, $dest_id) - { - $tables = array( - 'fichinterdet' - ); - - return CommonObject::commonReplaceProduct($db, $origin_id, $dest_id, $tables); - } } /** diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 874930d2ca9..ff73dff45c9 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -320,8 +320,7 @@ if (empty($reshook)) { 'Bom' => '/bom/class/bom.class.php', 'Contrat' => '/contrat/class/contrat.class.php', 'Reception' => '/reception/class/reception.class.php', - 'Fichinter' => '/fichinter/class/fichinter.class.php', - 'FichinterRec' => '/fichinter/class/fichinter.class.php', + 'FichinterRec' => '/fichinter/class/fichinterrec.class.php', 'CommandeFournisseur' => '/fourn/class/fournisseur.commande.class.php', 'FactureFournisseur' => '/fourn/class/fournisseur.facture.class.php', 'SupplierProposal' => '/supplier_proposal/class/supplier_proposal.class.php',