From 8e21a93963750d018ad273e1582867a5f8deab89 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 14 Aug 2005 22:57:41 +0000 Subject: [PATCH] =?UTF-8?q?New:=20Possibilit=E9=20de=20supprimer=20les=20c?= =?UTF-8?q?ategories=20ecritures=20bancaires=20(patch=20christophe)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/compta/bank/categ.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/bank/categ.php b/htdocs/compta/bank/categ.php index 81cdaa6d860..bb55c4b5de8 100644 --- a/htdocs/compta/bank/categ.php +++ b/htdocs/compta/bank/categ.php @@ -53,6 +53,23 @@ if ($_POST["action"] == 'add') } } +/* + * Action suppression catégorie + */ +if ( $_REQUEST['action'] == 'delete' ) +{ + if ( $_REQUEST['categid'] ) + { + $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_categ WHERE rowid='".$_REQUEST['categid']."'"; + $result = $db->query($sql); + + if (!$result) + { + dolibarr_print_error($db); + } + } +} + /* * Affichage liste des catégories */ @@ -80,7 +97,8 @@ if ($result) $var=!$var; print ""; print ''.$objp->rowid.''; - print "$objp->label"; + print "$objp->label"; + print ''; print ""; $i++; }