From a8f447498b35f2e16665e50e2774433b9c272c42 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 28 Feb 2019 19:30:44 +0100 Subject: [PATCH] Fix applying of credit note on invoice --- htdocs/fourn/facture/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 7c33a42b908..57a3e656c36 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -425,7 +425,7 @@ if (empty($reshook)) //var_dump($object->getRemainToPay(0)); //var_dump($discount->amount_ttc);exit; - if ($discount->amount_ttc > $object->getRemainToPay(0)) + if (price2num($discount->amount_ttc) > price2num($object->getRemainToPay(0))) { // TODO Split the discount in 2 automatically $error++;