From a1b8995aff02aec2f6400d981298b8eedc643598 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 13 Mar 2006 14:20:30 +0000 Subject: [PATCH] =?UTF-8?q?Ajout=20de=20la=20permission=20"consulter=20tou?= =?UTF-8?q?s=20les=20clients"=20dans=20le=20module=20commercial,=20afin=20?= =?UTF-8?q?=20qu'un=20commercial=20puisse=20voir=20que=20les=20clients=20q?= =?UTF-8?q?ui=20lui=20sont=20affect=E9s.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/product.class.php | 2 ++ htdocs/product/stats/contrat.php | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/htdocs/product.class.php b/htdocs/product.class.php index 52573995181..1bc47ca4f2c 100644 --- a/htdocs/product.class.php +++ b/htdocs/product.class.php @@ -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) { diff --git a/htdocs/product/stats/contrat.php b/htdocs/product/stats/contrat.php index 905536abc61..a3d08d84344 100644 --- a/htdocs/product/stats/contrat.php +++ b/htdocs/product/stats/contrat.php @@ -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) {