Ajout de la permission "consulter tous les clients" dans le module commercial, afin
qu'un commercial puisse voir que les clients qui lui sont affectés.
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.= " 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.= " FROM ".MAIN_DB_PREFIX."commandedet as cd, ".MAIN_DB_PREFIX."product as p,";
|
||||||
$sql.= " ".MAIN_DB_PREFIX."commande as c";
|
$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;
|
$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";
|
//$sql.= " AND c.fk_statut != 0";
|
||||||
if ($socid > 0)
|
if ($socid > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -88,6 +88,14 @@ if ($_GET["id"])
|
|||||||
$head[$h][1] = $langs->trans("Price");
|
$head[$h][1] = $langs->trans("Price");
|
||||||
$h++;
|
$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)
|
if($product->type == 0)
|
||||||
{
|
{
|
||||||
if ($user->rights->barcode->lire)
|
if ($user->rights->barcode->lire)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user