diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index 9469b680631c45a326071ce920e87ba64778b241..9e4ad9d1f5986101022586314d9b48f232e93139 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -231,7 +231,7 @@ class FormProjets $sql.= " FROM ".MAIN_DB_PREFIX.$table_element; $sql.= " WHERE ".$projectkey." is null"; - if (!empty($socid)) $sql.= " AND fk_soc=".$socid; + if (! empty($socid) && ! in_array($table_element, array('don'))) $sql.= " AND fk_soc=".$socid; if (! in_array($table_element, array('expensereport_det'))) $sql.= ' AND entity='.getEntity('project'); $sql.= " ORDER BY ref DESC";