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]).'