diff --git a/htdocs/product/stats/index.php b/htdocs/product/stats/index.php index 41ff7612e6b..956fc121018 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, sum(total_ht) FROM llx_commande GROUP BY dm DESC"; +$sql = "SELECT count(*), date_format(date_commande,'%Y') as dm, sum(total_ht) FROM llx_commande WHERE fk_statut > 0 GROUP BY dm DESC "; if ($db->query($sql)) { $num = $db->num_rows();
AnnéeNb de commandeSomme des factures
AnnéeNb de commandeSomme des commandes