diff --git a/htdocs/compta/bank/fiche.php b/htdocs/compta/bank/fiche.php index c63a62d1e27..c5756f289de 100644 --- a/htdocs/compta/bank/fiche.php +++ b/htdocs/compta/bank/fiche.php @@ -56,29 +56,26 @@ if ($_POST["action"] == 'add') $id = $account->create($user->id); } -if ($action == 'update') +if ($_POST["action"] == 'update') { - $account = new Account($db, $id); - $account->fetch($id); + $account = new Account($db, $_GET["id"]); + $account->fetch($_GET["id"]); - $account->bank = $_POST["bank"]; - $account->label = $_POST["label"]; - - $account->courant = $_POST["courant"]; - $account->clos = $_POST["clos"]; - - $account->code_banque = $_POST["code_banque"]; - $account->code_guichet = $_POST["code_guichet"]; - $account->number = $_POST["number"]; - $account->cle_rib = $_POST["cle_rib"]; - $account->bic = $_POST["bic"]; - $account->iban_prefix = $_POST["iban_prefix"]; - $account->domiciliation = $_POST["domiciliation"]; - - $account->proprio = $_POST["proprio"]; + $account->bank = $_POST["bank"]; + $account->label = $_POST["label"]; + $account->courant = $_POST["courant"]; + $account->clos = $_POST["clos"]; + $account->code_banque = $_POST["code_banque"]; + $account->code_guichet = $_POST["code_guichet"]; + $account->number = $_POST["number"]; + $account->cle_rib = $_POST["cle_rib"]; + $account->bic = $_POST["bic"]; + $account->iban_prefix = $_POST["iban_prefix"]; + $account->domiciliation = $_POST["domiciliation"]; + $account->proprio = $_POST["proprio"]; $account->adresse_proprio = $_POST["adresse_proprio"]; - $account->update($id, $user); + $account->update($_GET["id"], $user); } @@ -89,15 +86,15 @@ if ($action == 'update') /* */ /* ************************************************************************** */ -if ($action == 'create') +if ($_GET["action"] == 'create') { print_titre("Nouveau compte bancaire"); - print '