Fix: Delete bank accounts

This commit is contained in:
Laurent Destailleur 2012-01-19 23:32:23 +01:00
parent 9ad4f06e29
commit e8c7a37772

View File

@ -174,9 +174,10 @@ if ($_POST["action"] == 'update' && ! $_POST["cancel"])
if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == "yes" && $user->rights->banque->configurer)
{
// Modification
$account = new Account($db, $_GET["id"]);
$account->delete($_GET["id"]);
// Delete
$account = new Account($db);
$account->fetch($_GET["id"]);
$account->delete();
header("Location: ".DOL_URL_ROOT."/compta/bank/index.php");
exit;