21 |
*/ |
*/ |
22 |
require("./pre.inc.php"); |
require("./pre.inc.php"); |
23 |
|
|
|
|
|
24 |
if (!$user->rights->telephonie->lire) accessforbidden(); |
if (!$user->rights->telephonie->lire) accessforbidden(); |
25 |
|
|
26 |
llxHeader('','Telephonie - Statistiques - Distributeur'); |
if ($user->distributeur_id && $user->responsable_distributeur_id = 0) |
27 |
|
{ |
28 |
|
$_GET["id"] = $user->distributeur_id; |
29 |
|
} |
30 |
|
|
31 |
|
if ($user->responsable_distributeur_id > 0) |
32 |
|
{ |
33 |
|
if (!in_array($_GET["id"], $user->responsable_distributeur_commerciaux)) |
34 |
|
{ |
35 |
|
accessforbidden(); |
36 |
|
} |
37 |
|
} |
38 |
|
|
39 |
|
llxHeader('','Telephonie - Distributeur - Commercial'); |
40 |
|
|
41 |
/* |
/* |
42 |
* |
* |
44 |
$h = 0; |
$h = 0; |
45 |
$year = strftime("%Y",time()); |
$year = strftime("%Y",time()); |
46 |
|
|
|
if ($user->distributeur_id) |
|
|
{ |
|
|
$_GET["id"] = $user->distributeur_id; |
|
|
} |
|
|
|
|
47 |
if ($_GET["id"] && $_GET["did"]) |
if ($_GET["id"] && $_GET["did"]) |
48 |
{ |
{ |
49 |
$commercial = new User($db, $_GET["id"]); |
$commercial = new User($db, $_GET["id"]); |
60 |
$head[$h][1] = $commercial->prenom ." ". $commercial->nom; |
$head[$h][1] = $commercial->prenom ." ". $commercial->nom; |
61 |
$hselected = $h; |
$hselected = $h; |
62 |
$h++; |
$h++; |
63 |
/* |
|
64 |
$head[$h][0] = DOL_URL_ROOT.'/telephonie/distributeurs/po.php?id='.$distri->id; |
$head[$h][0] = DOL_URL_ROOT.'/telephonie/distributeurs/comm/ca.php?id='.$commercial->id.'&did='.$_GET["did"]; |
65 |
$head[$h][1] = "Prises d'ordre"; |
$head[$h][1] = "Chiffre d'affaire"; |
66 |
$h++; |
$h++; |
67 |
|
/* |
68 |
$head[$h][0] = DOL_URL_ROOT.'/telephonie/distributeurs/stats.php?id='.$distri->id; |
$head[$h][0] = DOL_URL_ROOT.'/telephonie/distributeurs/stats.php?id='.$distri->id; |
69 |
$head[$h][1] = "Statistiques"; |
$head[$h][1] = "Statistiques"; |
70 |
$h++; |
$h++; |