Fix buttons

This commit is contained in:
Alexandre SPANGARO
2018-05-20 14:08:47 +02:00
parent c41a9291f1
commit 4d3ce7a3d6

View File

@@ -768,7 +768,7 @@ if ($id > 0)
print '<div class="tabsAction">';
// Edit
if ($user->rights->loan->write)
if ($object->paid == 0 && $user->rights->loan->write)
{
print '<a href="javascript:popEcheancier()" class="butAction">'.$langs->trans('CreateCalcSchedule').'</a>';
@@ -788,7 +788,7 @@ if ($id > 0)
}
// Delete
if ($user->rights->loan->delete)
if ($object->paid == 0 && $user->rights->loan->delete)
{
print '<a class="butActionDelete" href="'.DOL_URL_ROOT.'/loan/card.php?id='.$object->id.'&amp;action=delete">'.$langs->trans("Delete").'</a>';
}