diff --git a/htdocs/compta/bank/pre.inc.php3 b/htdocs/compta/bank/pre.inc.php3 index c8f3b539e33..0a666bdc330 100644 --- a/htdocs/compta/bank/pre.inc.php3 +++ b/htdocs/compta/bank/pre.inc.php3 @@ -22,7 +22,8 @@ require("../../main.inc.php3"); require("./account.class.php3"); -function llxHeader($head = "") { +function llxHeader($head = "") +{ global $user, $conf, $account; /* @@ -39,19 +40,21 @@ function llxHeader($head = "") { $db = new Db(); $sql = "SELECT rowid, label FROM llx_bank_account"; $result = $db->query($sql); - if ($result) { + if ($result) + { - $num = $db->num_rows(); - $i = 0; + $num = $db->num_rows(); + $i = 0; - while ($i < $num) { - $objp = $db->fetch_object($i); - $menu->add("account.php3?account=" . $objp->rowid, $objp->label); - $menu->add_submenu("releve.php3?account=" . $objp->rowid ,"Relevés"); - $menu->add_submenu("rappro.php3?account=".$objp->rowid,"Rappro"); - $i++; + while ($i < $num) + { + $objp = $db->fetch_object($i); + $menu->add("account.php3?account=" . $objp->rowid, $objp->label); + $menu->add_submenu("releve.php3?account=" . $objp->rowid ,"Relevés"); + $menu->add_submenu("rappro.php3?account=".$objp->rowid,"Rappro"); + $i++; + } } - } $db->close; $menu->add("index.php3","Bank"); diff --git a/htdocs/compta/bank/virement.php3 b/htdocs/compta/bank/virement.php3 index 179e8cb301f..1e3e0a8a453 100644 --- a/htdocs/compta/bank/virement.php3 +++ b/htdocs/compta/bank/virement.php3 @@ -1,5 +1,20 @@ + * + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * * $Id$ * $Source$ * @@ -14,7 +29,8 @@ llxHeader(); $db = new Db(); -if ($action == 'add') { +if ($action == 'add') +{ $author = $GLOBALS["REMOTE_USER"]; $sql = "INSERT INTO llx_bank (datec, dateo, label, amount, author,fk_account)"; @@ -22,35 +38,25 @@ if ($action == 'add') { $result = $db->query($sql); - if (!$result) { - print $db->error(); - print "

$sql"; - } + if (!$result) + { + print $db->error(); + print "

$sql"; + } $sql = "INSERT INTO llx_bank (datec, dateo, label, amount, author,fk_account)"; $sql .= " VALUES (now(), $dateo, '$label', $amount,'$author',$account_to)"; $result = $db->query($sql); - if (!$result) { - print $db->error(); - print "

$sql"; - } - - -} -if ($action == 'del') { - bank_delete_line($db, $rowid); + if (!$result) + { + print $db->error(); + print "

$sql"; + } } -if ($vline) { - $viewline = $vline; -} else { - $viewline = 20; -} - -print "Virement - Reload -"; -print "Voir tout"; +print_titre("Virement"); print "

"; @@ -62,48 +68,51 @@ print ""; print ""; print ""; print ""; print ""; print ""; -print ""; print "Format : YYYYMMDD - 200108260000.00"; +print ''; print "
"; -print "Edit Categories"; -print " Budgets"; + $db->close(); -llxFooter(strftime("%H:%M",time()). " - Dernière modification $Date$ révision $Revision$"); +llxFooter(" - Dernière modification $Date$ révision $Revision$"); ?>