Fix picto and perm

This commit is contained in:
Laurent Destailleur 2022-05-03 17:05:14 +02:00
parent 6ebe41324f
commit fa7254be9a
9 changed files with 17 additions and 17 deletions

View File

@ -1043,7 +1043,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 .= '<div class="divsearchfield">';
$tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative');
@ -1051,9 +1051,9 @@ if ($resql) {
$moreforfilter .= '</div>';
}
// If the user can view prospects other than his'
if ($user->rights->societe->client->voir || $socid) {
if ($user->rights->user->user->lire) {
$moreforfilter .= '<div class="divsearchfield">';
$tmptitle = $langs->trans('LinkedToSpecificUsers');
$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');
$moreforfilter .= '</div>';
}

View File

@ -1321,7 +1321,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 .= '<div class="divsearchfield">';
$tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative');

View File

@ -1185,7 +1185,7 @@ 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 .= '<div class="divsearchfield">';
$tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative');
@ -1193,7 +1193,7 @@ if ($resql) {
$moreforfilter .= '</div>';
}
// If the user can view prospects other than his'
if ($user->rights->societe->client->voir || $socid) {
if ($user->rights->user->user->lire) {
$moreforfilter .= '<div class="divsearchfield">';
$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');

View File

@ -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 .= '<div class="divsearchfield">';
$tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative');

View File

@ -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 .= '<div class="divsearchfield">';
$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 .= '</div>';
}
@ -572,7 +572,7 @@ if ($user->rights->societe->client->voir || $socid) {
if ($user->rights->user->user->lire) {
$moreforfilter .= '<div class="divsearchfield">';
$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 .= '</div>';
}

View File

@ -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 .= '<div class="divsearchfield">';
$tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative');

View File

@ -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 .= '<div class="divsearchfield">';
$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 .= '</div>';
}
// If the user can view prospects other than his'
if ($user->rights->societe->client->voir || $socid) {
if ($user->rights->user->user->lire) {
$moreforfilter .= '<div class="divsearchfield">';
$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');

View File

@ -830,7 +830,7 @@ $moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form-
$moreforfilter .= '</div>';
// 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 .= '<div class="divsearchfield">';
$tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative');

View File

@ -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 .= '<div class="divsearchfield">';
$tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative');
@ -628,7 +628,7 @@ if ($resql) {
$moreforfilter .= '</div>';
}
// If the user can view prospects other than his'
if ($user->rights->societe->client->voir || $socid) {
if ($user->rights->user->user->lire) {
$moreforfilter .= '<div class="divsearchfield">';
$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');