diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 4c7e0714caa..d6babe42416 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -546,8 +546,8 @@ if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-> -// Last donations -if (!empty($conf->don->enabled) && $user->rights->societe->lire) +// Latest donations +if (!empty($conf->don->enabled) && $user->rights->don->lire) { include_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index aa576a6b11a..9035df18742 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -610,7 +610,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 f95c0b147b4..34dace09e93 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