diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index a17453889c4..5802ad20e56 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -609,7 +609,7 @@ class Project extends CommonObject } elseif ($type == 'loan') { - $sql = 'SELECT l.rowid, l.fk_user_author as fk_user FROM '.MAIN_DB_PREFIX."loan as l WHERE l.entity IN (".getEntity('loan').")"; + $sql = 'SELECT l.rowid, l.fk_user_author as fk_user FROM '.MAIN_DB_PREFIX."loan as l WHERE l.entity IN (".getEntity('loan').") AND l.fk_projet IN (".$ids.")"; } else { diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index ffd083d2359..6c527d0dd57 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2015 Laurent Destailleur + * Copyright (C) 2004-2020 Laurent Destailleur * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2012-2016 Juanjo Menent * Copyright (C) 2015-2019 Alexandre Spangaro