Modif permissions
This commit is contained in:
parent
05ed858673
commit
ff6abd47ed
@ -61,10 +61,11 @@ print '<br />';
|
||||
|
||||
$sql = "SELECT distinct statut, count(*) as cc";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."telephonie_contrat as l";
|
||||
if ($user->rights->telephonie->ligne->lire_restreint)
|
||||
{
|
||||
$sql .= " WHERE l.fk_commercial_suiv = ".$user->id;
|
||||
}
|
||||
$sql .= ",".MAIN_DB_PREFIX."societe_perms as sp";
|
||||
$sql .= " WHERE l.fk_client_comm = sp.fk_soc";
|
||||
$sql .= " AND sp.fk_user = ".$user->id." AND sp.pread = 1";
|
||||
|
||||
|
||||
$sql .= " GROUP BY statut";
|
||||
|
||||
if ($db->query($sql))
|
||||
|
||||
@ -117,7 +117,8 @@ if ($_GET["id"])
|
||||
print '</td><td width="50%" valign="top" align="center">';
|
||||
|
||||
$file = $img_root.$contrat->id."/graphgain.png";
|
||||
if (file_exists($file))
|
||||
|
||||
if (file_exists($file) && $user->rights->telephonie->ligne->gain)
|
||||
{
|
||||
print '<img src="'.DOL_URL_ROOT.'/telephonie/showgraph.php?graph='.$file.'" alt="CA Mensuel">';
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user