Update holiday.class.php

This commit is contained in:
Laurent Destailleur 2017-11-24 16:38:52 +01:00 committed by GitHub
parent 314c30f489
commit c2f84309db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1315,9 +1315,9 @@ class Holiday extends CommonObject
if (! empty($conf->multicompany->enabled) && ! empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE))
{
$sql.= ", ".MAIN_DB_PREFIX."usergroup_user as ug";
$sql.= " WHERE (ug.fk_user = u.rowid";
$sql.= " WHERE ((ug.fk_user = u.rowid";
$sql.= " AND ug.entity = ".$conf->entity.")";
$sql.= " OR u.admin = 1";
$sql.= " OR u.admin = 1)";
}
else
$sql.= " WHERE u.entity IN (0,".$conf->entity.")";