From 07cf09536d99e9200ac462130d2fdfdd5185b928 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 1 Aug 2014 14:48:48 +0200 Subject: [PATCH] Fix: delete bank account --- htdocs/compta/bank/bankid_fr.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/bank/bankid_fr.php b/htdocs/compta/bank/bankid_fr.php index 3c298e1c0b0..907792010ba 100644 --- a/htdocs/compta/bank/bankid_fr.php +++ b/htdocs/compta/bank/bankid_fr.php @@ -35,6 +35,7 @@ $langs->load("bills"); $action=GETPOST('action'); $id=GETPOST('id'); +$ref=GETPOST('ref'); // Security check if (isset($_GET["id"]) || isset($_GET["ref"])) @@ -88,8 +89,9 @@ if ($action == 'update' && ! $_POST["cancel"]) if ($action == 'confirm_delete' && $_POST["confirm"] == "yes" && $user->rights->banque->configurer) { // Modification - $account = new Account($db, $_GET["id"]); - $account->delete($_GET["id"]); + $account = new Account($db); + $account->fetch($id); + $account->delete(); header("Location: ".DOL_URL_ROOT."/compta/bank/index.php"); exit;