diff --git a/htdocs/margin/agentMargins.php b/htdocs/margin/agentMargins.php index 32525114ee3..efea924b280 100644 --- a/htdocs/margin/agentMargins.php +++ b/htdocs/margin/agentMargins.php @@ -36,7 +36,7 @@ $langs->load("margins"); // Security check -if ($user->rights->margin->read->all) { +if ($user->rights->margins->read->all) { $agentid = GETPOST('agentid', 'int'); } else { $agentid = $user->id; @@ -91,7 +91,7 @@ dol_fiche_head($head, 'agentMargins', $titre, 0, $picto); print '
'; print ''; -if ($user->rights->margin->read->all) { +if ($user->rights->margins->read->all) { print ''; print '
'.$langs->trans('SalesRepresentative').''; print $form->select_dolusers($agentid, 'agentid', 1); diff --git a/htdocs/margin/lib/margins.lib.php b/htdocs/margin/lib/margins.lib.php index 1478dd9dcb0..ce100d49390 100644 --- a/htdocs/margin/lib/margins.lib.php +++ b/htdocs/margin/lib/margins.lib.php @@ -77,7 +77,7 @@ function marges_prepare_head() $h++; } - if ($user->rights->margin->read->all) { + if ($user->rights->margins->read->all) { $title = 'UserMargins'; } else { $title = 'SalesRepresentativeMargins';