Ajout de la permission "consulter tous les clients" dans le module commercial, afin

qu'un commercial puisse voir que les clients qui lui sont affects.
This commit is contained in:
Regis Houssin 2006-03-10 16:08:22 +00:00
parent bf3496fc30
commit dec9f95d7d
4 changed files with 18 additions and 2 deletions

View File

@ -63,9 +63,12 @@ print '<td align="center">'.$langs->trans("NbOpenTasks").'</td>';
print "</tr>\n";
$sql = "SELECT p.title, p.rowid, count(t.rowid)";
if (!$user->rights->commercial->client->voir && !$socidp) $sql .= ", sc.fk_soc, sc.fk_user";
$sql .= " FROM ".MAIN_DB_PREFIX."projet as p";
$sql .= " , ".MAIN_DB_PREFIX."projet_task as t";
if (!$user->rights->commercial->client->voir && !$socidp) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql .= " WHERE t.fk_projet = p.rowid";
if (!$user->rights->commercial->client->voir && !$socidp) $sql .= " AND p.fk_soc = sc.fk_soc AND sc.fk_user = " .$user->id;
$sql .= " GROUP BY p.rowid";
@ -96,7 +99,7 @@ else
}
print "</table>";
/* Affichage de la liste des projets de la semaine */
/* Affichage de la liste des projets d'aujourd'hui */
print '<br /><table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td width="50%">'.$langs->trans('Today').'</td>';
@ -140,6 +143,7 @@ print '<td align="center">'.$total.'</td>';
print "</tr>\n";
print "</table>";
/* Affichage de la liste des projets d'hier */
print '<br /><table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td width="50%">'.$langs->trans('Yesterday').'</td>';
@ -265,7 +269,7 @@ else
}
print "</table>";
/* Affichage de la liste des projets du mois */
/* Affichage de la liste des projets de l'année */
print '<br /><table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td width="50%">'.$langs->trans("Project").' cette année : '.strftime("%Y", $now).'</td>';

View File

@ -47,6 +47,10 @@ $head[$h][0] = DOL_URL_ROOT.'/projet/fiche.php?id='.$projet->id;
$head[$h][1] = $langs->trans("Project");
$h++;
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/fiche.php?id='.$projet->id;
$head[$h][1] = $langs->trans("Tasks");
$h++;
if ($conf->propal->enabled) {
$langs->load("propal");
$head[$h][0] = DOL_URL_ROOT.'/projet/propal.php?id='.$projet->id;

View File

@ -52,6 +52,10 @@ $head[$h][0] = DOL_URL_ROOT.'/projet/fiche.php?id='.$projet->id;
$head[$h][1] = $langs->trans("Project");
$h++;
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/fiche.php?id='.$projet->id;
$head[$h][1] = $langs->trans("Tasks");
$h++;
if ($conf->propal->enabled) {
$langs->load("propal");
$head[$h][0] = DOL_URL_ROOT.'/projet/propal.php?id='.$projet->id;

View File

@ -48,6 +48,10 @@ $head[$h][0] = DOL_URL_ROOT.'/projet/fiche.php?id='.$projet->id;
$head[$h][1] = $langs->trans("Project");
$h++;
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/fiche.php?id='.$projet->id;
$head[$h][1] = $langs->trans("Tasks");
$h++;
if ($conf->propal->enabled) {
$langs->load("propal");
$head[$h][0] = DOL_URL_ROOT.'/projet/propal.php?id='.$projet->id;