From af473df2143a275a4d1704a2ac2dfaaefa5dfa48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sat, 9 Apr 2016 23:27:42 +0200 Subject: [PATCH] FIX #4742 Able to delete a supplier invoice with a registered payment Close #4742 --- htdocs/fourn/facture/card.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index c2b2c587736..7887e8cc6ed 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 ''.$langs->trans('Delete').''; + if ($object->getSommePaiement()) { + print '
' . $langs->trans('Delete') . '
'; + } else { + print ''.$langs->trans('Delete').''; + } } print ''; print '
';