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:
parent
5b62c59877
commit
a1b8995aff
@ -856,7 +856,9 @@ class Product
|
||||
$sql.= " COUNT(cd.rowid) as nb_rows, SUM(cd.qty) as qty";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commandedet as cd, ".MAIN_DB_PREFIX."product as p,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."commande as c";
|
||||
if (!$user->rights->commercial->client->voir && $socid = 0) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE c.rowid = cd.fk_commande AND p.rowid = cd.fk_product AND p.rowid = ".$this->id;
|
||||
if (!$user->rights->commercial->client->voir && $socid = 0) $sql .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
//$sql.= " AND c.fk_statut != 0";
|
||||
if ($socid > 0)
|
||||
{
|
||||
|
||||
@ -87,6 +87,14 @@ if ($_GET["id"])
|
||||
$head[$h][0] = DOL_URL_ROOT."/product/price.php?id=".$product->id;
|
||||
$head[$h][1] = $langs->trans("Price");
|
||||
$h++;
|
||||
|
||||
//affichage onglet catégorie
|
||||
if ($conf->categorie->enabled)
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT."/product/categorie.php?id=".$product->id;
|
||||
$head[$h][1] = $langs->trans('Categories');
|
||||
$h++;
|
||||
}
|
||||
|
||||
if($product->type == 0)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user