diff --git a/htdocs/compta/ca.php3 b/htdocs/compta/ca.php3
index 358b1bff9db..64d137cf1f8 100644
--- a/htdocs/compta/ca.php3
+++ b/htdocs/compta/ca.php3
@@ -39,7 +39,6 @@ if ($user->societe_id > 0)
print_titre("Chiffres d'affaires en euros HT");
-
$sql = "SELECT sum(f.amount) as amount , date_format(f.datef,'%Y-%m') as dm";
$sql .= " FROM llx_facture as f WHERE f.paye = 1";
@@ -50,10 +49,10 @@ if ($socidp)
$sql .= " GROUP BY dm DESC";
$result = $db->query($sql);
-if ($result) {
+if ($result)
+{
$num = $db->num_rows();
$i = 0;
- $var=True;
while ($i < $num)
{
$row = $db->fetch_row($i);
@@ -62,8 +61,6 @@ if ($result) {
}
}
-
-
print '
';
print ' | ';
@@ -74,7 +71,6 @@ for ($annee = 2001 ; $annee < 2006 ; $annee++)
print '
';
for ($mois = 1 ; $mois < 13 ; $mois++)
{
-
print '';
print "| ".strftime("%B",mktime(1,1,1,$mois,1,2000))." | ";
for ($annee = 2001 ; $annee < 2006 ; $annee++)
@@ -91,55 +87,10 @@ for ($mois = 1 ; $mois < 13 ; $mois++)
print '
';
}
-
- //pt($db, $sql,"Par mois");
-
-
-
print "
";
$db->close();
llxFooter("Dernière modification $Date$ révision $Revision$");
-/*
- * Fonctions
- *
- */
-
-function pt ($db, $sql, $date)
-{
- global $bc;
-
- $result = $db->query($sql);
- if ($result) {
- $num = $db->num_rows();
- $i = 0; $total = 0 ;
- print "";
- print "";
- print "| $date | ";
- print "Montant | ";
- print " | \n";
- print "
\n";
- $var=True;
- while ($i < $num) {
- $obj = $db->fetch_object( $i);
- $var=!$var;
- print "";
- print "| $obj->dm | \n";
- print "".price($obj->amount)." | | \n";
- print "
\n";
-
- $total = $total + $obj->amount;
-
- $i++;
- }
- print '| Total : | '.price($total).' | euros HT |
';
-
- print "
";
- $db->free();
- }
-}
-
-
?>