2
0
forked from Wavyzz/dolibarr

FIX bug if multicompany disabled

avoid bad constantes
This commit is contained in:
ptibogxiv
2021-11-10 14:53:17 +01:00
committed by GitHub
parent 13e8e3d33c
commit 0afaf080ee

View File

@@ -1926,7 +1926,7 @@ class Form
$sql .= " WHERE u.entity IS NOT NULL";
}
} else {
if (!empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) {
if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) {
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ug";
$sql .= " ON ug.fk_user = u.rowid";
$sql .= " WHERE ug.entity = ".$conf->entity;