Merge pull request #4002 from marcosgdf/bug-3997

FIX #3997 Wrong permission key used for Margins > Read all
This commit is contained in:
Laurent Destailleur 2015-11-16 23:40:47 +01:00
commit 9693982f27
2 changed files with 3 additions and 3 deletions

View File

@ -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 '<form method="post" name="sel" action="'.$_SERVER['PHP_SELF'].'">';
print '<table class="border" width="100%">';
if ($user->rights->margin->read->all) {
if ($user->rights->margins->read->all) {
print '<tr><td width="20%">'.$langs->trans('SalesRepresentative').'</td>';
print '<td colspan="4">';
print $form->select_dolusers($agentid, 'agentid', 1);

View File

@ -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';