Skip to content
Snippets Groups Projects
Commit f201e31b authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Show grey button if not allowed

parent f6eabd65
Branches
Tags
No related merge requests found
...@@ -1283,13 +1283,21 @@ else ...@@ -1283,13 +1283,21 @@ else
//print '<a class="butAction" href="fiche.php?facid='.$fac->id.'&amp;action=paid">'.$langs->trans('ClassifyPaid').'</a>'; //print '<a class="butAction" href="fiche.php?facid='.$fac->id.'&amp;action=paid">'.$langs->trans('ClassifyPaid').'</a>';
} }
if ($_GET['action'] != 'edit' && $fac->statut == 0 && $user->rights->fournisseur->facture->valider) if ($_GET['action'] != 'edit' && $fac->statut == 0)
{ {
if (sizeof($fac->lignes)) if (sizeof($fac->lignes))
{
if ($user->rights->fournisseur->facture->valider)
{ {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?facid='.$fac->id.'&amp;action=valid"'; print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?facid='.$fac->id.'&amp;action=valid"';
print '>'.$langs->trans('Validate').'</a>'; print '>'.$langs->trans('Validate').'</a>';
} }
else
{
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'"';
print '>'.$langs->trans('Validate').'</a>';
}
}
} }
if ($_GET['action'] != 'edit' && $user->rights->fournisseur->facture->creer) if ($_GET['action'] != 'edit' && $user->rights->fournisseur->facture->creer)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment