Fix: affichait les stats des services lorsque le module n'tait pas actif

This commit is contained in:
Regis Houssin 2006-05-26 13:58:59 +00:00
parent f421ccd3a3
commit 437339c821
3 changed files with 18 additions and 17 deletions

View File

@ -16,6 +16,7 @@ ProductsOrServices=Products or Services
ProductsAndServicesOnSell=Products and Services on sell
ProductsAndServicesNotOnSell=Products and Services out of sell
ProductsAndServicesStatistics=Products and Services statistics
ProductsStatistics=Products statistics
ProductsOnSell=Products on sell
ProductsNotOnSell=Products out of sell
ServicesOnSell=Services on sell

View File

@ -16,6 +16,7 @@ ProductsAndServices=Produits et Services
ProductsAndServicesOnSell=Produits et Services en vente
ProductsAndServicesNotOnSell=Produits et Services hors vente
ProductsAndServicesStatistics=Statistiques produits et services
ProductsStatistics=Statistiques produits
ProductsOnSell=Produits en vente
ProductsNotOnSell=Produits hors vente
ServicesOnSell=Services en vente

View File

@ -86,25 +86,24 @@ else
print_fiche_titre($langs->trans("ProductsStatistics"), $mesg);
}
print '<br>';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Summary").'</td><td>'.$langs->trans("Value").'</td>';
print "</tr>\n";
$var=True;
print "<tr ".$bc[$var].">";
print '<td width="40%">Nb de produit dans le catalogue</td>';
print '<td>'.$nbproduct.'</td></tr>';
$var=!$var;
print "<tr ".$bc[$var].">";
print '<td width="40%">Nb de produit dans le catalogue qui ne sont pas en vente</td>';
print '<td>'.$nbhv.'</td></tr>';
if ($conf->service->enabled)
{
print '<br>';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Summary").'</td><td>'.$langs->trans("Value").'</td>';
print "</tr>\n";
$var=True;
print "<tr ".$bc[$var].">";
print '<td width="40%">Nb de produit dans le catalogue</td>';
print '<td>'.$nbproduct.'</td></tr>';
$var=!$var;
print "<tr ".$bc[$var].">";
print '<td width="40%">Nb de produit dans le catalogue qui ne sont pas en vente</td>';
print '<td>'.$nbhv.'</td></tr>';
$sql = "SELECT count(*)";
$sql .= " FROM ".MAIN_DB_PREFIX."product as p";
if ($conf->categorie->enabled && !$user->rights->categorie->voir)