diff --git a/htdocs/compta/bank/categ.php3 b/htdocs/compta/bank/categ.php3 index 46217dbeb08..ec5c71fec0b 100644 --- a/htdocs/compta/bank/categ.php3 +++ b/htdocs/compta/bank/categ.php3 @@ -1,8 +1,5 @@ - * - * $Id$ - * $Source$ +/* Copyright (C) 2001-2003 Rodolphe Quiedeville * * 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 @@ -18,6 +15,9 @@ * 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$ + * */ require("./pre.inc.php3"); @@ -25,29 +25,34 @@ require("./pre.inc.php3"); llxHeader(); $db = new Db(); - -if ($action == 'add') { +if ($action == 'add') +{ $author = $GLOBALS["REMOTE_USER"]; - if ($credit > 0) { - $amount = $credit ; - } else { - $amount = - $debit ; - } + if ($credit > 0) + { + $amount = $credit ; + } + else + { + $amount = - $debit ; + } $sql = "INSERT INTO llx_bank_categ (label) VALUES ('$label')"; $result = $db->query($sql); - if (!$result) { - print $db->error(); - print "

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

$sql"; + } } -print "Categorie reload"; +print_titre("Catégories"); print "

"; print ""; print ""; -print ""; +print ''; print ""; print "\n"; @@ -55,24 +60,26 @@ print "\n"; $sql = "SELECT rowid, label FROM llx_bank_categ ORDER BY label"; $result = $db->query($sql); -if ($result) { +if ($result) +{ $num = $db->num_rows(); $i = 0; $total = 0; $var=True; - while ($i < $num) { - $objp = $db->fetch_object( $i); - $var=!$var; - print ""; - print ""; - print ""; - print ""; - $i++; - } + while ($i < $num) + { + $objp = $db->fetch_object( $i); + $var=!$var; + print ""; + print ""; + print ""; + print ""; + $i++; + } $db->free(); } print ""; -print ""; +print ""; print ""; print "
NumDescription
$objp->rowid$objp->label
$objp->rowid$objp->label
 
";