FIX #4742 Able to delete a supplier invoice with a registered payment
Close #4742
This commit is contained in:
parent
f90cffd74a
commit
af473df214
@ -2270,7 +2270,11 @@ else
|
|||||||
// Delete
|
// Delete
|
||||||
if ($action != 'edit' && $user->rights->fournisseur->facture->supprimer)
|
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 '</div>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user