Comptabilise les commandes validées
This commit is contained in:
parent
aa766df8f9
commit
b13109069c
@ -32,9 +32,9 @@ llxHeader();
|
|||||||
print_fiche_titre('Statistiques commandes', $mesg);
|
print_fiche_titre('Statistiques commandes', $mesg);
|
||||||
|
|
||||||
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
|
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
|
||||||
print '<tr><td>Année</td><td width="40%">Nb de commande</td><td>Somme des factures</td></tr>';
|
print '<tr><td>Année</td><td width="40%">Nb de commande</td><td>Somme des commandes</td></tr>';
|
||||||
|
|
||||||
$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))
|
if ($db->query($sql))
|
||||||
{
|
{
|
||||||
$num = $db->num_rows();
|
$num = $db->num_rows();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user