From a9adccabc3fedce5ec4ae67e255f5e6bf0ce2464 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 25 Jun 2019 15:48:41 +0200 Subject: [PATCH] Update contrat.class.php --- htdocs/contrat/class/contrat.class.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 91a373743c4..0c7eeb66d67 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -718,8 +718,9 @@ class Contrat extends CommonObject * * @return ContratLigne[] Return array of contract lines */ - public function fetch_lines() + public function fetch_lines($loadalsotranslation = 0) { + global $langs, $conf; // phpcs:enable $this->nbofserviceswait=0; $this->nbofservicesopened=0; @@ -828,6 +829,13 @@ class Contrat extends CommonObject // Retreive all extrafields for contract // fetch optionals attributes and labels $line->fetch_optionals(); + + // multilangs + if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($objp->fk_product) && ! empty($loadalsotranslation)) { + $line = new Product($this->db); + $line->fetch($objp->fk_product); + $line->getMultiLangs(); + } $this->lines[$pos] = $line; $this->lines_id_index_mapper[$line->id] = $pos;