From fb0732be289e1a2522f07210a57562970f312cc0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 12 Nov 2006 19:46:18 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20Le=20user=20de=20creatio=20n'=E9tait=20p?= =?UTF-8?q?as=20sauvegard=E9=20lors=20de=20la=20creation=20d'une=20=E9crit?= =?UTF-8?q?ure=20bancaire?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/compta/bank/account.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index 556fea2bef1..c214cb5f8b0 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -43,6 +43,11 @@ $vline=isset($_GET["vline"])?$_GET["vline"]:$_POST["vline"]; $action=isset($_GET["action"])?$_GET["action"]:$_POST["action"]; $page=isset($_GET["page"])?$_GET["page"]:0; + +/* +* Action +*/ + if ($_POST["action"] == 'add' && $account && ! isset($_POST["cancel"])) { if ($_POST["credit"] > 0) @@ -63,16 +68,15 @@ if ($_POST["action"] == 'add' && $account && ! isset($_POST["cancel"])) $acct=new Account($db,$account); - $insertid = $acct->addline($dateop, $operation, $label, $amount, $num_chq, $cat1); - - if ($insertid) + $insertid = $acct->addline($dateop, $operation, $label, $amount, $num_chq, $cat1, $user); + if ($insertid > 0) { Header("Location: account.php?account=" . $account); exit; } else { - dolibarr_print_error($db); + dolibarr_print_error($db,$acct->error); } } if ($_GET["action"] == 'del' && $account && $user->rights->banque->modifier) @@ -82,6 +86,9 @@ if ($_GET["action"] == 'del' && $account && $user->rights->banque->modifier) } +/* +* Affichage page +*/ llxHeader();