From 73a33a6daea9f09d260ad4c4a73bf2cc1796b4f5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 13 Jul 2013 17:55:14 +0200 Subject: [PATCH] Fix: Bug to delete bank line --- htdocs/compta/bank/account.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index fe9cbdd0bfc..828dcf94262 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -120,7 +120,7 @@ if ($action == 'add' && $id && ! isset($_POST["cancel"]) && $user->rights->banqu if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->banque->modifier) { $accline=new AccountLine($db); - $accline->fetch($_GET["rowid"]); + $result=$accline->fetch(GETPOST("rowid")); $result=$accline->delete(); } @@ -294,6 +294,14 @@ if ($id > 0 || ! empty($ref)) */ $param.='&account='.$object->id; + // Confirmation delete + if ($action == 'delete') + { + $text=$langs->trans('ConfirmDeleteTransaction'); + $ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&rowid='.GETPOST("rowid"),$langs->trans('DeleteTransaction'),$text,'confirm_delete'); + if ($ret == 'html') print '
'; + } + // Define transaction list navigation string $navig = '
'; //print 'nbpage='.$totalPages.' viewline='.$viewline.' limitsql='.$limitsql; @@ -316,14 +324,6 @@ if ($id > 0 || ! empty($ref)) $navig.='
'; //var_dump($navig); - // Confirmation delete - if ($action == 'delete') - { - $text=$langs->trans('ConfirmDeleteTransaction'); - $ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&rowid='.$_GET["rowid"],$langs->trans('DeleteTransaction'),$text,'confirm_delete'); - if ($ret == 'html') print '
'; - } - print ''; // Show title