From 92b7914ef39a40d5dc9845ca4fd9694ab54f57e7 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Fri, 9 Jun 2017 11:09:06 +0200 Subject: [PATCH] Fix : button convert was still available even if deposit was already converted --- htdocs/compta/facture.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index d7f6a5c7dfd..c19c521ca65 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -3938,6 +3938,9 @@ else if ($id > 0 || ! empty($ref)) } } + $discount = new DiscountAbsolute($db); + $result = $discount->fetch(0, $object->id); + // Reopen a standard paid invoice if ((($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT) || ($object->type == Facture::TYPE_CREDIT_NOTE && empty($discount->id))