From 5f30b2db302d40a0a7539cf1e85c686e2ffee34c Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 14 Sep 2005 12:12:08 +0000 Subject: [PATCH] Modif graphiques --- .../distributeurs/comm/commercial.php | 29 ++++++++++++------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/htdocs/telephonie/distributeurs/comm/commercial.php b/htdocs/telephonie/distributeurs/comm/commercial.php index afe054dd656..5f3882c7172 100644 --- a/htdocs/telephonie/distributeurs/comm/commercial.php +++ b/htdocs/telephonie/distributeurs/comm/commercial.php @@ -21,10 +21,22 @@ */ require("./pre.inc.php"); - if (!$user->rights->telephonie->lire) accessforbidden(); -llxHeader('','Telephonie - Statistiques - Distributeur'); +if ($user->distributeur_id && $user->responsable_distributeur_id = 0) +{ + $_GET["id"] = $user->distributeur_id; +} + +if ($user->responsable_distributeur_id > 0) +{ + if (!in_array($_GET["id"], $user->responsable_distributeur_commerciaux)) + { + accessforbidden(); + } +} + +llxHeader('','Telephonie - Distributeur - Commercial'); /* * @@ -32,11 +44,6 @@ llxHeader('','Telephonie - Statistiques - Distributeur'); $h = 0; $year = strftime("%Y",time()); -if ($user->distributeur_id) -{ - $_GET["id"] = $user->distributeur_id; -} - if ($_GET["id"] && $_GET["did"]) { $commercial = new User($db, $_GET["id"]); @@ -53,11 +60,11 @@ if ($_GET["id"] && $_GET["did"]) $head[$h][1] = $commercial->prenom ." ". $commercial->nom; $hselected = $h; $h++; - /* - $head[$h][0] = DOL_URL_ROOT.'/telephonie/distributeurs/po.php?id='.$distri->id; - $head[$h][1] = "Prises d'ordre"; + + $head[$h][0] = DOL_URL_ROOT.'/telephonie/distributeurs/comm/ca.php?id='.$commercial->id.'&did='.$_GET["did"]; + $head[$h][1] = "Chiffre d'affaire"; $h++; - + /* $head[$h][0] = DOL_URL_ROOT.'/telephonie/distributeurs/stats.php?id='.$distri->id; $head[$h][1] = "Statistiques"; $h++;