From dff0612fd1e67d988488e108a8522c7c7e5af8d0 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Fri, 7 Nov 2003 16:54:35 +0000 Subject: [PATCH] Ajout somme des commandes --- htdocs/product/stats/index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/product/stats/index.php b/htdocs/product/stats/index.php index ae1c3af3a8e..41ff7612e6b 100644 --- a/htdocs/product/stats/index.php +++ b/htdocs/product/stats/index.php @@ -32,9 +32,9 @@ llxHeader(); print_fiche_titre('Statistiques commandes', $mesg); print ''; -print ''; +print ''; -$sql = "SELECT count(*), date_format(date_commande,'%Y') as dm FROM llx_commande GROUP BY dm DESC"; +$sql = "SELECT count(*), date_format(date_commande,'%Y') as dm, sum(total_ht) FROM llx_commande GROUP BY dm DESC"; if ($db->query($sql)) { $num = $db->num_rows(); @@ -45,7 +45,7 @@ if ($db->query($sql)) $nbproduct = $row[0]; $year = $row[1]; print ""; - print ''; + print ''; $i++; } }
Nb de commandeAnnée
AnnéeNb de commandeSomme des factures
'.$nbproduct.''.$year.'
'.$year.''.$nbproduct.''.price($row[2]).'