Fix: delete bank account
This commit is contained in:
parent
a5a7fb4967
commit
07cf09536d
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user