Merge pull request #4985 from marcosgdf/bug-4742
FIX #4742 Able to delete a supplier invoice with a registered payment
This commit is contained in:
commit
be0b7c86ff
@ -2270,7 +2270,11 @@ else
|
||||
// Delete
|
||||
if ($action != 'edit' && $user->rights->fournisseur->facture->supprimer)
|
||||
{
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete">'.$langs->trans('Delete').'</a>';
|
||||
if ($object->getSommePaiement()) {
|
||||
print '<div class="inline-block divButAction"><a class="butActionRefused" href="#" title="' . $langs->trans("DisabledBecausePayments") . '">' . $langs->trans('Delete') . '</a></div>';
|
||||
} else {
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete">'.$langs->trans('Delete').'</a>';
|
||||
}
|
||||
}
|
||||
print '</div>';
|
||||
print '<br>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user