diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index c2b2c5877364c566d37e00c17f9c892114a6d4f8..7887e8cc6edd672377e0a4b85e97347ce5a36860 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -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>';