diff --git a/htdocs/product/index.php b/htdocs/product/index.php index bcba12afae1..4d5bb801833 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -47,14 +47,31 @@ print ''; /* * Produits en ventes et hors vente */ +$sql = "SELECT count(*), fk_product_type FROM llx_product as p WHERE envente = 0 GROUP BY fk_product_type"; +if ($db->query($sql)) +{ + $num = $db->num_rows(); + $i = 0; + $phv[0] = 0; + $phv[1] = 0; + while ($i < $num) + { + $row = $db->fetch_row($i); + $phv[$row[1]] = $row[0]; + $i++; + } + $db->free(); +} + + print ''; print ''; print ""; -print ''; +print ''; if (defined("MAIN_MODULE_SERVICE") && MAIN_MODULE_SERVICE) { print ""; - print ''; + print ''; } print '
Hors vente
Produits hors vente
Produits hors vente'.$phv[0].'
Services hors vente
Services hors vente'.$phv[1].'
'; print '';