Modif onglet tarifs
This commit is contained in:
parent
4c5e11ccca
commit
7b7ed7737c
@ -65,10 +65,19 @@ if ($_GET["id"])
|
|||||||
$head[$h][1] = $langs->trans("Stats");
|
$head[$h][1] = $langs->trans("Stats");
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT."/telephonie/client/tarifs.php?id=".$soc->id;
|
$sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."telephonie_tarif_client";
|
||||||
$head[$h][1] = $langs->trans("Tarifs");
|
$sql .= " WHERE fk_client = '".$soc->id."';";
|
||||||
$h++;
|
$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 (".$row[0].")");
|
||||||
|
$h++;
|
||||||
|
|
||||||
dolibarr_fiche_head($head, $hselected, 'Client : '.$soc->nom);
|
dolibarr_fiche_head($head, $hselected, 'Client : '.$soc->nom);
|
||||||
|
|
||||||
|
|||||||
@ -67,8 +67,18 @@ if ($_GET["id"])
|
|||||||
$head[$h][1] = $langs->trans("Stats");
|
$head[$h][1] = $langs->trans("Stats");
|
||||||
$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][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++;
|
$h++;
|
||||||
|
|
||||||
if ($soc->perm_perms)
|
if ($soc->perm_perms)
|
||||||
|
|||||||
@ -69,8 +69,18 @@ if ($_GET["id"])
|
|||||||
$head[$h][1] = $langs->trans("Stats");
|
$head[$h][1] = $langs->trans("Stats");
|
||||||
$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][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++;
|
$h++;
|
||||||
|
|
||||||
dolibarr_fiche_head($head, $hselected, 'Client : '.$soc->nom);
|
dolibarr_fiche_head($head, $hselected, 'Client : '.$soc->nom);
|
||||||
|
|||||||
@ -67,10 +67,19 @@ if ($_GET["id"])
|
|||||||
$hselected = $h;
|
$hselected = $h;
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT."/telephonie/client/tarifs.php?id=".$soc->id;
|
$sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."telephonie_tarif_client";
|
||||||
$head[$h][1] = $langs->trans("Tarifs");
|
$sql .= " WHERE fk_client = '".$soc->id."';";
|
||||||
$h++;
|
$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 (".$row[0].")");
|
||||||
|
$h++;
|
||||||
|
|
||||||
dolibarr_fiche_head($head, $hselected, 'Client : '.$soc->nom);
|
dolibarr_fiche_head($head, $hselected, 'Client : '.$soc->nom);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user