From 1c6faf79a9762c00fc6fc5da29e00953a7c85cf9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 13 Apr 2020 14:23:57 +0200 Subject: [PATCH 1/2] FIX #13595 --- htdocs/projet/class/project.class.php | 2 +- htdocs/projet/element.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 From f726fcdcd8a3275e9f7d10e1f166347d708cbde7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 13 Apr 2020 14:32:15 +0200 Subject: [PATCH 2/2] FIX #13593 --- htdocs/compta/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index c9a77e5cc26..e056e14c192 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';