From 5a006d824ebe1f89b27701713fa0ae3f2a919b8d Mon Sep 17 00:00:00 2001 From: phf Date: Wed, 27 May 2015 10:52:23 +0200 Subject: [PATCH 1/2] FIX : top links menu have target attribute with wrong value --- htdocs/product/reassort.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index d0b8c961afa..e824cd06b13 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -190,7 +190,7 @@ if ($resql) $texte.=' ('.$langs->trans("Stocks").')'; - llxHeader("",$title,$helpurl,$texte); + llxHeader("",$texte,$helpurl); if ($sref || $snom || $sall || GETPOST('search')) { From 9f52b9e800fde722b57677c11c78774583261647 Mon Sep 17 00:00:00 2001 From: phf Date: Fri, 29 May 2015 17:27:05 +0200 Subject: [PATCH 2/2] FIX : #2901 --- htdocs/compta/dons/card.php | 10 +++++++++- htdocs/compta/dons/class/don.class.php | 5 +++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/dons/card.php b/htdocs/compta/dons/card.php index 7bf909378b4..41b129a4cc6 100644 --- a/htdocs/compta/dons/card.php +++ b/htdocs/compta/dons/card.php @@ -554,7 +554,15 @@ if (! empty($id) && $action != 'edit') if ($user->rights->don->supprimer) { - print '"; + if ($don->statut == -1 || $don->statut == 0) + { + print '"; + } + else + { + print '"; + } + } else { diff --git a/htdocs/compta/dons/class/don.class.php b/htdocs/compta/dons/class/don.class.php index a8f7c11d92b..06d383e1c50 100644 --- a/htdocs/compta/dons/class/don.class.php +++ b/htdocs/compta/dons/class/don.class.php @@ -449,10 +449,11 @@ class Don extends CommonObject */ function delete($rowid) { - + global $user; + $this->db->begin(); - $sql = "DELETE FROM ".MAIN_DB_PREFIX."don WHERE rowid = $rowid AND fk_statut = 0;"; + $sql = "DELETE FROM ".MAIN_DB_PREFIX."don WHERE rowid = $rowid AND fk_statut = 0 OR fk_statut = -1"; $resql=$this->db->query($sql); if ($resql)