From f8321d757c3b3012667997b9e5d566b336822e4c Mon Sep 17 00:00:00 2001 From: jlb Date: Wed, 3 Sep 2003 14:12:49 +0000 Subject: [PATCH] modification de la maniere d'inserer les enregistrements dans la table llx_bank --- htdocs/compta/bank/account.php3 | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/htdocs/compta/bank/account.php3 b/htdocs/compta/bank/account.php3 index e409a628277..43d441b13b7 100644 --- a/htdocs/compta/bank/account.php3 +++ b/htdocs/compta/bank/account.php3 @@ -1,5 +1,6 @@ + * Copyright (C) 2003 Jean-Louis Bergamo * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,8 +27,8 @@ * */ require("./pre.inc.php3"); -require("./bank.lib.php3"); - +//require("./bank.lib.php3"); +//require("./account.class.php"); if ($HTTP_POST_VARS["action"] == 'add' && $account) { @@ -41,7 +42,15 @@ if ($HTTP_POST_VARS["action"] == 'add' && $account) } $dateop = "$dateoy" . "$dateo"; - + $acct=new Account($db,$account); + $insertid=$acct->addline($dateop, $operation, $label, $amount, $num_chq,$cat1); + // $insertid=bank_add_line($db,$dateop, $label, $amount,$author,$num_chq,$account,$operation,$cat1); + if ($insertid == ''){ + print "

Probleme d'insertion : ".$db->error(); + }else{ + Header("Location: $PHP_SELF?account=$account"); + } + /* if ($num_chq) { $sql = "INSERT INTO llx_bank (datec, dateo, label, amount, author, num_chq,fk_account, fk_type)"; @@ -69,11 +78,13 @@ if ($HTTP_POST_VARS["action"] == 'add' && $account) print $db->error(); print "

$sql"; } - + */ } if ($action == 'del' && $account) { - bank_delete_line($db, $rowid); + $acct=new Account($db,$account); + $acct->deleteline($rowid); + //bank_delete_line($db, $rowid); } @@ -381,7 +392,7 @@ if ($account) $db->free(); } - $acc = new Account($db); + //$acc = new Account($db); print ""; }