diff --git a/htdocs/telephonie/client/factures.php b/htdocs/telephonie/client/factures.php
index 806023cdeef..8ed14ebc350 100644
--- a/htdocs/telephonie/client/factures.php
+++ b/htdocs/telephonie/client/factures.php
@@ -64,12 +64,21 @@ if ($_GET["id"])
$head[$h][0] = DOL_URL_ROOT."/telephonie/client/stats.php?id=".$soc->id;
$head[$h][1] = $langs->trans("Stats");
$h++;
-
+
+ $sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."telephonie_tarif_client";
+ $sql .= " WHERE fk_client = '".$soc->id."';";
+ $resql = $db->query($sql);
+
+ if ($resql)
+ {
+ $row = $db->fetch_row($resql);
+ $db->free($resql);
+ }
+
$head[$h][0] = DOL_URL_ROOT."/telephonie/client/tarifs.php?id=".$soc->id;
- $head[$h][1] = $langs->trans("Tarifs");
+ $head[$h][1] = $langs->trans("Tarifs (".$row[0].")");
$h++;
-
-
+
dolibarr_fiche_head($head, $hselected, 'Client : '.$soc->nom);
print '
';
diff --git a/htdocs/telephonie/client/fiche.php b/htdocs/telephonie/client/fiche.php
index ab9e5ed2af5..b526f168ead 100644
--- a/htdocs/telephonie/client/fiche.php
+++ b/htdocs/telephonie/client/fiche.php
@@ -66,9 +66,19 @@ if ($_GET["id"])
$head[$h][0] = DOL_URL_ROOT."/telephonie/client/stats.php?id=".$soc->id;
$head[$h][1] = $langs->trans("Stats");
$h++;
-
+
+ $sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."telephonie_tarif_client";
+ $sql .= " WHERE fk_client = '".$soc->id."';";
+ $resql = $db->query($sql);
+
+ if ($resql)
+ {
+ $row = $db->fetch_row($resql);
+ $db->free($resql);
+ }
+
$head[$h][0] = DOL_URL_ROOT."/telephonie/client/tarifs.php?id=".$soc->id;
- $head[$h][1] = $langs->trans("Tarifs");
+ $head[$h][1] = $langs->trans("Tarifs (".$row[0].")");
$h++;
if ($soc->perm_perms)
diff --git a/htdocs/telephonie/client/lignes.php b/htdocs/telephonie/client/lignes.php
index b5436a9f91c..e9dd36485dd 100644
--- a/htdocs/telephonie/client/lignes.php
+++ b/htdocs/telephonie/client/lignes.php
@@ -68,9 +68,19 @@ if ($_GET["id"])
$head[$h][0] = DOL_URL_ROOT."/telephonie/client/stats.php?id=".$soc->id;
$head[$h][1] = $langs->trans("Stats");
$h++;
-
+
+ $sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."telephonie_tarif_client";
+ $sql .= " WHERE fk_client = '".$soc->id."';";
+ $resql = $db->query($sql);
+
+ if ($resql)
+ {
+ $row = $db->fetch_row($resql);
+ $db->free($resql);
+ }
+
$head[$h][0] = DOL_URL_ROOT."/telephonie/client/tarifs.php?id=".$soc->id;
- $head[$h][1] = $langs->trans("Tarifs");
+ $head[$h][1] = $langs->trans("Tarifs (".$row[0].")");
$h++;
dolibarr_fiche_head($head, $hselected, 'Client : '.$soc->nom);
diff --git a/htdocs/telephonie/client/stats.php b/htdocs/telephonie/client/stats.php
index 6bd54008bad..b16d93a1f3d 100644
--- a/htdocs/telephonie/client/stats.php
+++ b/htdocs/telephonie/client/stats.php
@@ -66,12 +66,21 @@ if ($_GET["id"])
$head[$h][1] = $langs->trans("Stats");
$hselected = $h;
$h++;
-
+
+ $sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."telephonie_tarif_client";
+ $sql .= " WHERE fk_client = '".$soc->id."';";
+ $resql = $db->query($sql);
+
+ if ($resql)
+ {
+ $row = $db->fetch_row($resql);
+ $db->free($resql);
+ }
+
$head[$h][0] = DOL_URL_ROOT."/telephonie/client/tarifs.php?id=".$soc->id;
- $head[$h][1] = $langs->trans("Tarifs");
+ $head[$h][1] = $langs->trans("Tarifs (".$row[0].")");
$h++;
-
-
+
dolibarr_fiche_head($head, $hselected, 'Client : '.$soc->nom);
print '