FIX #3997 Wrong permission key used for Margins > Read all

This commit is contained in:
Marcos García de La Fuente 2015-11-16 13:16:54 +01:00
parent 43f3999234
commit 73da011461
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';