diff --git a/htdocs/compta/bank/fiche.php b/htdocs/compta/bank/fiche.php index ed31633298f..f4bb9671dd9 100644 --- a/htdocs/compta/bank/fiche.php +++ b/htdocs/compta/bank/fiche.php @@ -33,12 +33,14 @@ if ($HTTP_POST_VARS["action"] == 'add') $account->label = $HTTP_POST_VARS["label"]; $account->courant = $HTTP_POST_VARS["courant"]; + $account->clos = $HTTP_POST_VARS["clos"]; $account->code_banque = $HTTP_POST_VARS["code_banque"]; $account->code_guichet = $HTTP_POST_VARS["code_guichet"]; $account->number = $HTTP_POST_VARS["number"]; $account->cle_rib = $HTTP_POST_VARS["cle_rib"]; $account->bic = $HTTP_POST_VARS["bic"]; + $account->iban_prefix = $HTTP_POST_VARS["iban_prefix"]; $id = $account->create($user->id); @@ -46,18 +48,23 @@ if ($HTTP_POST_VARS["action"] == 'add') if ($action == 'update') { - $account = new User($db, $id); - $account->fetch(); + $account = new Account($db, $id); + $account->fetch($id); - $account->nom = $nom; - $account->prenom = $prenom; - $account->login = $login; - $account->email = $email; + $account->bank = $HTTP_POST_VARS["bank"]; + $account->label = $HTTP_POST_VARS["label"]; - if (! $account->update($id, $user)) - { - print $account->error(); - } + $account->courant = $HTTP_POST_VARS["courant"]; + $account->clos = $HTTP_POST_VARS["clos"]; + + $account->code_banque = $HTTP_POST_VARS["code_banque"]; + $account->code_guichet = $HTTP_POST_VARS["code_guichet"]; + $account->number = $HTTP_POST_VARS["number"]; + $account->cle_rib = $HTTP_POST_VARS["cle_rib"]; + $account->bic = $HTTP_POST_VARS["bic"]; + $account->iban_prefix = $HTTP_POST_VARS["iban_prefix"]; + + $account->update($id, $user); } @@ -90,7 +97,7 @@ if ($action == 'create') print '
| - | '; print '- | '; print '- | '; - print '