From aa228737b7633a7d6403bb5a7e9b19aa71109855 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 3 Feb 2003 13:12:42 +0000 Subject: [PATCH] Gestion du mode edition --- htdocs/compta/bank/fiche.php | 91 ++++++++++++++++++++++-------------- 1 file changed, 55 insertions(+), 36 deletions(-) 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 'Clé IBAN'; - print ''; + print ''; print 'Identifiant BIC'; print ''; @@ -137,18 +144,16 @@ else print ''.$account->cle_rib.''; print 'Clé IBAN'; - print ''; + print ''.$account->iban_prefix.''; print 'Identifiant BIC'; - print ''; + print ''.$account->bic.''; print 'Compte Courant'; - print ''; - - - print ''; - + print ''.$yn[$account->courant].''; + + print 'Compte Clos'; + print ''.$yn[$account->clos].''; print ''; print '
'; @@ -165,7 +170,6 @@ else print ''; print ''; print ''; - print '
---

'; @@ -177,37 +181,52 @@ else if ($action == 'edit' && $user->admin) { - print '
Edition de l\'utilisateur

'; - print '
'; + + $form = new Form($db); + + print '

'; print ''; + print ''; - print ''; - print ''; + print ''; + print ''; - print ''; - print ''; + print ''; + print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; + print ''; - print ''; - print ''; + print ''; + print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; - print ''; + print ''; + + print '"; - print ''; + print ''; print ''; print '
Id'.$fuser->id.'
Banque
Nom
Libellé
Prénom
Code BanqueCode GuichetNuméroClé RIB
Login
Clé IBAN
Email
Identifiant BIC
Compte Courant'; + $form->selectyesnonum("courant",$account->courant); + print '
Description'; + print '
Compte Cloturé'; + $form->selectyesnonum("clos",$account->clos); + print '
Description'; print "
'; } - + } }