Fix : project list was showing all projects instead of company project. This wasn't matching the function comments.

This commit is contained in:
Maxime Kohlhaas 2014-06-20 13:59:50 +02:00
parent f2760f74ed
commit dd83a52fb1

View File

@ -77,6 +77,7 @@ class FormProjets
$sql.= " WHERE p.entity = ".$conf->entity;
if ($projectsListId !== false) $sql.= " AND p.rowid IN (".$projectsListId.")";
if ($socid == 0) $sql.= " AND (p.fk_soc=0 OR p.fk_soc IS NULL)";
if ($socid > 0) $sql.= " AND (p.fk_soc=".$socid." OR p.fk_soc IS NULL)";
$sql.= " ORDER BY p.title ASC";
dol_syslog(get_class($this)."::select_projects sql=".$sql,LOG_DEBUG);