From dd83a52fb1ee0ce5eacf8801550c1f0c568b3a6b Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Fri, 20 Jun 2014 13:59:50 +0200 Subject: [PATCH] Fix : project list was showing all projects instead of company project. This wasn't matching the function comments. --- htdocs/core/class/html.formprojet.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index 2c371d4afcd9e..a47d524dee79c 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -77,6 +77,7 @@ function select_projects($socid=-1, $selected='', $htmlname='projectid', $maxlen $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);