Fix for multicompany

This commit is contained in:
Laurent Destailleur
2018-02-06 10:57:53 +01:00
parent 565372eaab
commit ea92f6beae
13 changed files with 20 additions and 21 deletions

View File

@@ -330,7 +330,7 @@ class FormProjets
$sql.= ' FROM '.MAIN_DB_PREFIX .'projet as p';
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe as s ON s.rowid = p.fk_soc';
$sql.= ', '.MAIN_DB_PREFIX.'projet_task as t';
$sql.= " WHERE p.entity = ".$conf->entity;
$sql.= " WHERE p.entity IN (".getEntity('project').")";
$sql.= " AND t.fk_projet = p.rowid";
if ($projectsListId !== false) $sql.= " AND p.rowid IN (".$projectsListId.")";
if ($socid == 0) $sql.= " AND (p.fk_soc=0 OR p.fk_soc IS NULL)";