From 61f1445fbf05cfe0c4aaf0266ef1fdc84d52d7d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 28 Mar 2023 11:27:31 +0200 Subject: [PATCH] fix ajax tooltip for account --- htdocs/compta/bank/class/account.class.php | 1 + htdocs/core/lib/functions.lib.php | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 35b9dba1e54..e8b645db7bb 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -1416,6 +1416,7 @@ class Account extends CommonObject public function getTooltipContentArray($params) { global $langs; + $langs->loadLangs(['banks', 'compta']); include_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; $datas = array(); diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 2bba488f51b..79d5f038678 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -11245,7 +11245,12 @@ function getElementProperties($element_type) $subelement = 'Actioncomm'; $module = 'agenda'; } - + if ($element_type == 'bank_account') { + $classpath = 'compta/bank/class'; + $module = 'banque'; + $classfile = 'Account'; + $classname = 'Account'; + } // To work with non standard path if ($element_type == 'facture' || $element_type == 'invoice') { $classpath = 'compta/facture/class'; @@ -11361,7 +11366,6 @@ function fetchObjectByElement($element_id, $element_type, $element_ref = '') $ret = 0; $element_prop = getElementProperties($element_type); - if (is_array($element_prop) && isModEnabled($element_prop['module'])) { dol_include_once('/'.$element_prop['classpath'].'/'.$element_prop['classfile'].'.class.php');