';
-$sql = "SELECT libelle, montant ";
+$sql = "SELECT s.rowid , libelle, count(cs.rowid) ";
$sql .= " FROM ".MAIN_DB_PREFIX."telephonie_service as s";
-
+$sql .= " , ".MAIN_DB_PREFIX."telephonie_contrat_service as cs";
+$sql .= " WHERE cs.fk_service = s.rowid";
+$sql .= " GROUP by s.rowid DESC";
+//print $sql;
if ($db->query($sql))
{
$num = $db->num_rows();
$i = 0;
-
print '';
- print '| Libellé | ';
+ print ' | Libellé | - | ';
print " \n";
$var=True;
while ($i < min($num,$conf->liste_limit))
{
- $obj = $db->fetch_object($i);
- print "| ".stripslashes($obj->libelle)." | ";
+ $row = $db->fetch_row();
+ print '| '.stripslashes($row[1])." | ";
+ print ''.$row[2]." | ";
$i++;
}
@@ -69,10 +72,11 @@ else
}
print ' ';
-
+print ' ';
print ' | ';
+
print ' ';
diff --git a/htdocs/telephonie/service/pre.inc.php b/htdocs/telephonie/service/pre.inc.php
index f2d152f6d8e..8c14b549952 100644
--- a/htdocs/telephonie/service/pre.inc.php
+++ b/htdocs/telephonie/service/pre.inc.php
@@ -57,8 +57,6 @@ function llxHeader($head = "", $title="") {
- $menu->add(DOL_URL_ROOT."/telephonie/statca/", "Chiffre d'affaire");
-
left_menu($menu->liste);
}
diff --git a/htdocs/telephonie/stats/commerciaux/pre.inc.php b/htdocs/telephonie/stats/commerciaux/pre.inc.php
index 4638990f9fb..0113ceba653 100644
--- a/htdocs/telephonie/stats/commerciaux/pre.inc.php
+++ b/htdocs/telephonie/stats/commerciaux/pre.inc.php
@@ -34,30 +34,7 @@ function llxHeader($head = "", $title="") {
$menu = new Menu();
- $menu->add(DOL_URL_ROOT."/telephonie/index.php", "Telephonie");
-
- $menu->add(DOL_URL_ROOT."/telephonie/client/index.php", "Clients");
-
- $menu->add(DOL_URL_ROOT."/telephonie/contrat/index.php", "Contrats");
-
- $menu->add(DOL_URL_ROOT."/telephonie/ligne/index.php", "Lignes");
-
- $menu->add(DOL_URL_ROOT."/telephonie/ligne/commande/", "Commandes");
-
- $menu->add(DOL_URL_ROOT."/telephonie/stats/", "Statistiques");
- $menu->add_submenu(DOL_URL_ROOT."/telephonie/stats/clients/", "Clients");
- $menu->add_submenu(DOL_URL_ROOT."/telephonie/stats/commerciaux/", "Commerciaux");
- $menu->add_submenu(DOL_URL_ROOT."/telephonie/stats/lignes/", "Lignes");
- $menu->add_submenu(DOL_URL_ROOT."/telephonie/stats/communications/", "Communications");
- $menu->add_submenu(DOL_URL_ROOT."/telephonie/stats/factures/", "Factures");
-
- $menu->add(DOL_URL_ROOT."/telephonie/facture/", "Factures");
-
- $menu->add(DOL_URL_ROOT."/telephonie/tarifs/", "Tarifs");
-
- $menu->add(DOL_URL_ROOT."/telephonie/fournisseurs.php", "Fournisseurs");
-
- $menu->add(DOL_URL_ROOT."/telephonie/statca/", "Chiffre d'affaire");
+ include "../menus.php";
left_menu($menu->liste);
}
diff --git a/htdocs/telephonie/stats/communications/pre.inc.php b/htdocs/telephonie/stats/communications/pre.inc.php
index 171db97d2c0..0113ceba653 100644
--- a/htdocs/telephonie/stats/communications/pre.inc.php
+++ b/htdocs/telephonie/stats/communications/pre.inc.php
@@ -1,5 +1,5 @@
+/* Copyright (C) 2005 Rodolphe Quiedeville
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -20,7 +20,6 @@
*
*/
require("../../../main.inc.php");
-require(DOL_DOCUMENT_ROOT."/telephonie/lignetel.class.php");
$user->getrights('telephonie');
@@ -35,31 +34,7 @@ function llxHeader($head = "", $title="") {
$menu = new Menu();
- $menu->add(DOL_URL_ROOT."/telephonie/index.php", "Telephonie");
-
- $menu->add(DOL_URL_ROOT."/telephonie/client/index.php", "Clients");
-
- $menu->add(DOL_URL_ROOT."/telephonie/contrat/index.php", "Contrats");
-
- $menu->add(DOL_URL_ROOT."/telephonie/ligne/index.php", "Lignes");
-
- $menu->add(DOL_URL_ROOT."/telephonie/ligne/commande/", "Commandes");
-
- $menu->add(DOL_URL_ROOT."/telephonie/stats/", "Statistiques");
- $menu->add_submenu(DOL_URL_ROOT."/telephonie/stats/clients/", "Clients");
- $menu->add_submenu(DOL_URL_ROOT."/telephonie/stats/commerciaux/", "Commerciaux");
- $menu->add_submenu(DOL_URL_ROOT."/telephonie/stats/lignes/", "Lignes");
- $menu->add_submenu(DOL_URL_ROOT."/telephonie/stats/communications/", "Communications");
- $menu->add_submenu(DOL_URL_ROOT."/telephonie/stats/fournisseurs/", "Fournisseurs");
- $menu->add_submenu(DOL_URL_ROOT."/telephonie/stats/factures/", "Factures");
-
- $menu->add(DOL_URL_ROOT."/telephonie/facture/", "Factures");
-
- $menu->add(DOL_URL_ROOT."/telephonie/tarifs/", "Tarifs");
-
- $menu->add(DOL_URL_ROOT."/telephonie/fournisseurs.php", "Fournisseurs");
-
- $menu->add(DOL_URL_ROOT."/telephonie/statca/", "Chiffre d'affaire");
+ include "../menus.php";
left_menu($menu->liste);
}
|