From 1f5cbfe19d9deb234517af7004f3cf82145c0e02 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Thu, 24 Feb 2005 14:06:42 +0000 Subject: [PATCH] Ajout onglet info --- htdocs/telephonie/contrat/fiche.php | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/htdocs/telephonie/contrat/fiche.php b/htdocs/telephonie/contrat/fiche.php index cae2f91a996..200cc512d5f 100644 --- a/htdocs/telephonie/contrat/fiche.php +++ b/htdocs/telephonie/contrat/fiche.php @@ -25,12 +25,6 @@ require_once DOL_DOCUMENT_ROOT."/lib/dolibarrmail.class.php"; $mesg = ''; -$dt = time(); - -$h = strftime("%H",$dt); -$m = strftime("%M",$dt); -$s = strftime("%S",$dt); - if ($_POST["action"] == 'add') { $contrat = new TelephonieContrat($db); @@ -91,7 +85,6 @@ if ($_POST["action"] == 'addcontact') { Header("Location: fiche.php?id=".$contrat->id); } - } if ($_GET["action"] == 'delcontact') @@ -116,8 +109,6 @@ if ($_GET["action"] == 'delete') Header("Location: index.php"); } - - llxHeader("","","Fiche Contrat"); if ($cancel == $langs->trans("Cancel")) @@ -420,7 +411,24 @@ else $head[$h][1] = $langs->trans("Contrat"); $hselected = $h; $h++; + + $nser = $contrat->count_associated_services(); + $head[$h][0] = DOL_URL_ROOT."/telephonie/contrat/services.php?id=".$contrat->id; + if ($nser > 0) + { + $head[$h][1] = $langs->trans("Services")." (".$nser.")"; + } + else + { + $head[$h][1] = $langs->trans("Services"); + } + $h++; + + $head[$h][0] = DOL_URL_ROOT."/telephonie/contrat/info.php?id=".$contrat->id; + $head[$h][1] = $langs->trans("Infos"); + $h++; + dolibarr_fiche_head($head, $hselected, 'Contrat : '.$contrat->ref); print_fiche_titre('Fiche Contrat', $mesg);