diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php index 9c3e0991a59..6d819ae4aa5 100644 --- a/htdocs/compta/charges/index.php +++ b/htdocs/compta/charges/index.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004 Laurent Destailleur + * Copyright (C) 2004-2005 Laurent Destailleur * * 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 @@ -21,7 +21,7 @@ * */ -/*! +/** \file htdocs/compta/charges/index.php \ingroup compta \brief Page liste des charges @@ -74,7 +74,8 @@ if ( $db->query($sql) ) { $num = $db->num_rows(); $i = 0; - + $var=true; + while ($i < $num) { $obj = $db->fetch_object(); $var = !$var; @@ -90,7 +91,7 @@ if ( $db->query($sql) ) dolibarr_print_error($db); } -/* +/** * Factures fournisseurs */ $sql = "SELECT count(f.rowid) as nb, sum(total_ttc) as total, sum(IF(paye=1,total_ttc,0)) as totalpaye"; diff --git a/htdocs/compta/sociales/index.php b/htdocs/compta/sociales/index.php index f5dcaa3657d..fc2297b1d33 100644 --- a/htdocs/compta/sociales/index.php +++ b/htdocs/compta/sociales/index.php @@ -44,19 +44,13 @@ llxHeader(); $sortfield = isset($_GET["sortfield"])?$_GET["sortfield"]:$_POST["sortfield"]; $sortorder = isset($_GET["sortorder"])?$_GET["sortorder"]:$_POST["sortorder"]; $page = $_GET["page"]; -if ($page < 0) { - $page = 0 ; } +if ($page < 0) $page = 0; $limit = $conf->liste_limit; $offset = $limit * $page ; -if ($sortfield == "") { - $sortfield="c.id"; } - -if ($sortorder == "") -{ - $sortorder="DESC"; -} +if (! $sortfield) $sortfield="c.id"; +if (! $sortorder) $sortorder="DESC"; /* @@ -121,7 +115,7 @@ print ""; * */ if ($user->rights->compta->charges->creer) { - $var = !$var; + $var=false; print ""; print '
'; @@ -225,6 +219,7 @@ if ( $db->query($sql) ) { $num = $db->num_rows(); $i = 0; + $var=true; while ($i < $num) {