mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge pull request #24354 from frederic34/account_tooltip
fix ajax tooltip for account
This commit is contained in:
commit
4faeea1476
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -11239,87 +11239,86 @@ function getElementProperties($element_type)
|
|||
$subelement = $regs[2];
|
||||
}
|
||||
|
||||
// For compat
|
||||
// For compat and To work with non standard path
|
||||
if ($element_type == "action") {
|
||||
$classpath = 'comm/action/class';
|
||||
$subelement = 'Actioncomm';
|
||||
$module = 'agenda';
|
||||
}
|
||||
|
||||
// To work with non standard path
|
||||
if ($element_type == 'facture' || $element_type == 'invoice') {
|
||||
} elseif ($element_type == 'bank_account') {
|
||||
$classpath = 'compta/bank/class';
|
||||
$module = 'banque';
|
||||
$classfile = 'Account';
|
||||
$classname = 'Account';
|
||||
} elseif ($element_type == 'stock') {
|
||||
$classpath = 'product/stock/class';
|
||||
$classfile = 'entrepot';
|
||||
$classname = 'Entrepot';
|
||||
} elseif ($element_type == 'project') {
|
||||
$classpath = 'projet/class';
|
||||
$module = 'projet';
|
||||
} elseif ($element_type == 'project_task') {
|
||||
$classpath = 'projet/class';
|
||||
$module = 'projet';
|
||||
$subelement = 'task';
|
||||
} elseif ($element_type == 'facture' || $element_type == 'invoice') {
|
||||
$classpath = 'compta/facture/class';
|
||||
$module = 'facture';
|
||||
$subelement = 'facture';
|
||||
}
|
||||
if ($element_type == 'commande' || $element_type == 'order') {
|
||||
} elseif ($element_type == 'commande' || $element_type == 'order') {
|
||||
$classpath = 'commande/class';
|
||||
$module = 'commande';
|
||||
$subelement = 'commande';
|
||||
}
|
||||
if ($element_type == 'propal') {
|
||||
} elseif ($element_type == 'propal') {
|
||||
$classpath = 'comm/propal/class';
|
||||
}
|
||||
if ($element_type == 'supplier_proposal') {
|
||||
} elseif ($element_type == 'supplier_proposal') {
|
||||
$classpath = 'supplier_proposal/class';
|
||||
}
|
||||
if ($element_type == 'shipping') {
|
||||
} elseif ($element_type == 'shipping') {
|
||||
$classpath = 'expedition/class';
|
||||
$subelement = 'expedition';
|
||||
$module = 'expedition_bon';
|
||||
}
|
||||
if ($element_type == 'delivery') {
|
||||
} elseif ($element_type == 'delivery') {
|
||||
$classpath = 'delivery/class';
|
||||
$subelement = 'delivery';
|
||||
$module = 'delivery_note';
|
||||
}
|
||||
if ($element_type == 'contract') {
|
||||
} elseif ($element_type == 'contract') {
|
||||
$classpath = 'contrat/class';
|
||||
$module = 'contrat';
|
||||
$subelement = 'contrat';
|
||||
}
|
||||
if ($element_type == 'member') {
|
||||
} elseif ($element_type == 'member') {
|
||||
$classpath = 'adherents/class';
|
||||
$module = 'adherent';
|
||||
$subelement = 'adherent';
|
||||
}
|
||||
if ($element_type == 'cabinetmed_cons') {
|
||||
} elseif ($element_type == 'cabinetmed_cons') {
|
||||
$classpath = 'cabinetmed/class';
|
||||
$module = 'cabinetmed';
|
||||
$subelement = 'cabinetmedcons';
|
||||
}
|
||||
if ($element_type == 'fichinter') {
|
||||
} elseif ($element_type == 'fichinter') {
|
||||
$classpath = 'fichinter/class';
|
||||
$module = 'ficheinter';
|
||||
$subelement = 'fichinter';
|
||||
}
|
||||
if ($element_type == 'dolresource' || $element_type == 'resource') {
|
||||
} elseif ($element_type == 'dolresource' || $element_type == 'resource') {
|
||||
$classpath = 'resource/class';
|
||||
$module = 'resource';
|
||||
$subelement = 'dolresource';
|
||||
}
|
||||
if ($element_type == 'propaldet') {
|
||||
} elseif ($element_type == 'propaldet') {
|
||||
$classpath = 'comm/propal/class';
|
||||
$module = 'propal';
|
||||
$subelement = 'propaleligne';
|
||||
}
|
||||
if ($element_type == 'order_supplier') {
|
||||
} elseif ($element_type == 'order_supplier') {
|
||||
$classpath = 'fourn/class';
|
||||
$module = 'fournisseur';
|
||||
$classfile = 'fournisseur.commande';
|
||||
$element = 'commande';
|
||||
$subelement = '';
|
||||
$classname = 'CommandeFournisseur';
|
||||
}
|
||||
if ($element_type == 'invoice_supplier') {
|
||||
} elseif ($element_type == 'invoice_supplier') {
|
||||
$classpath = 'fourn/class';
|
||||
$module = 'fournisseur';
|
||||
$classfile = 'fournisseur.facture';
|
||||
$element = 'facture';
|
||||
$subelement = '';
|
||||
$classname = 'FactureFournisseur';
|
||||
}
|
||||
if ($element_type == "service") {
|
||||
} elseif ($element_type == "service") {
|
||||
$classpath = 'product/class';
|
||||
$subelement = 'product';
|
||||
}
|
||||
|
|
@ -11361,7 +11360,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');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user