';
$tmptitle = $langs->trans('LinkedToSpecificUsers');
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_user, 'search_user', $tmptitle, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth250');
diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php
index 6c23cfcf720..cbcfa2b6efe 100644
--- a/htdocs/contrat/list.php
+++ b/htdocs/contrat/list.php
@@ -550,7 +550,7 @@ if ($sall) {
$moreforfilter = '';
// If the user can view prospects other than his'
-if ($user->rights->societe->client->voir || $socid) {
+if ($user->rights->user->user->lire) {
$langs->load("commercial");
$moreforfilter .= '
';
$tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative');
diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php
index 0d079f5dbdc..7ae586020c6 100644
--- a/htdocs/expedition/list.php
+++ b/htdocs/expedition/list.php
@@ -560,11 +560,11 @@ if ($sall) {
$moreforfilter = '';
// If the user can view prospects other than his'
-if ($user->rights->societe->client->voir || $socid) {
+if ($user->rights->user->user->lire) {
$langs->load("commercial");
$moreforfilter .= '
';
$tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative');
- $moreforfilter .= img_picto($tmptitle, 'user');
+ $moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"');
$moreforfilter .= $formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmptitle, 'maxwidth200');
$moreforfilter .= '
';
}
@@ -572,7 +572,7 @@ if ($user->rights->societe->client->voir || $socid) {
if ($user->rights->user->user->lire) {
$moreforfilter .= '
';
$tmptitle = $langs->trans('LinkedToSpecificUsers');
- $moreforfilter .= img_picto($tmptitle, 'user');
+ $moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"');
$moreforfilter .= $form->select_dolusers($search_user, 'search_user', $tmptitle, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth200');
$moreforfilter .= '
';
}
diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php
index 3ddb1350a8b..98df5e11170 100644
--- a/htdocs/fourn/commande/list.php
+++ b/htdocs/fourn/commande/list.php
@@ -1195,7 +1195,7 @@ if ($resql) {
$moreforfilter = '';
// If the user can view prospects other than his'
- if ($user->rights->societe->client->voir || $socid) {
+ if ($user->rights->user->user->lire) {
$langs->load("commercial");
$moreforfilter .= '
';
$tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative');
diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php
index ce4065815d9..bc0e80e9f69 100644
--- a/htdocs/fourn/facture/list.php
+++ b/htdocs/fourn/facture/list.php
@@ -877,15 +877,15 @@ if ($resql) {
// If the user can view prospects other than his'
$moreforfilter = '';
- if ($user->rights->societe->client->voir || $socid) {
+ if ($user->rights->user->user->lire) {
$langs->load("commercial");
$moreforfilter .= '
';
$tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative');
- $moreforfilter .= img_picto($tmptitle, 'company', 'class="pictofixedwidth"').$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmptitle, 'maxwidth200');
+ $moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmptitle, 'maxwidth200');
$moreforfilter .= '
';
}
// If the user can view prospects other than his'
- if ($user->rights->societe->client->voir || $socid) {
+ if ($user->rights->user->user->lire) {
$moreforfilter .= '
';
$tmptitle = $langs->trans('LinkedToSpecificUsers');
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_user, 'search_user', $tmptitle, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth200');
diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php
index 93c92231bfd..6ec329c41f4 100644
--- a/htdocs/projet/list.php
+++ b/htdocs/projet/list.php
@@ -830,7 +830,7 @@ $moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form-
$moreforfilter .= '
';
// If the user can view thirdparties other than his'
-if ($user->rights->societe->client->voir || $socid) {
+if ($user->rights->user->user->lire) {
$langs->load("commercial");
$moreforfilter .= '
';
$tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative');
diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php
index 33f0c4693f8..55fdaf6f413 100644
--- a/htdocs/supplier_proposal/list.php
+++ b/htdocs/supplier_proposal/list.php
@@ -620,7 +620,7 @@ if ($resql) {
$moreforfilter = '';
// If the user can view prospects other than his'
- if ($user->rights->societe->client->voir || $socid) {
+ if ($user->rights->user->user->lire) {
$langs->load("commercial");
$moreforfilter .= '
';
$tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative');
@@ -628,7 +628,7 @@ if ($resql) {
$moreforfilter .= '
';
}
// If the user can view prospects other than his'
- if ($user->rights->societe->client->voir || $socid) {
+ if ($user->rights->user->user->lire) {
$moreforfilter .= '
';
$tmptitle = $langs->trans('LinkedToSpecificUsers');
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_user, 'search_user', $tmptitle, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth250 widthcentpercentminusx');