From ed8e12aee7c73acbb78ce001b6d7709d6bd2aacc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 6 Nov 2023 13:36:26 +0100 Subject: [PATCH] PERF: Removed a useless fetch_thirdparty --- htdocs/contrat/class/contrat.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 8f40581acd9..020f146ab9c 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -2770,7 +2770,7 @@ class Contrat extends CommonObject // Load contract $object = new Contrat($this->db); $object->fetch($obj->rowid); // fetch also lines - $object->fetch_thirdparty(); + //$object->fetch_thirdparty(); if ($object->id <= 0) { $error++; @@ -2803,7 +2803,7 @@ class Contrat extends CommonObject } if ($someinvoicenotpaid) { $this->output .= 'Contract '.$object->ref.' is qualified for renewal but there is '.$someinvoicenotpaid.' invoice(s) unpayed so we cancel renewal'."\n"; - $contractignored[$object->id]=$object->ref; + $contractignored[$object->id] = $object->ref; continue; } } @@ -2845,7 +2845,7 @@ class Contrat extends CommonObject $actioncomm->datep = $now; $actioncomm->datef = $now; $actioncomm->percentage = -1; // Not applicable - $actioncomm->socid = $object->thirdparty->id; + $actioncomm->socid = $object->socid; $actioncomm->authorid = $user->id; // User saving action $actioncomm->userownerid = $user->id; // Owner of action $actioncomm->fk_element = $object->id;