From 77e793267116a7cf6a4df703b9c1db5f621aec68 Mon Sep 17 00:00:00 2001 From: gauthier Date: Tue, 5 Jun 2018 11:33:58 +0200 Subject: [PATCH] FIX : sometimes amounts are identical but php find them different. --- htdocs/compta/facture/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 06330de7682..993194e0f91 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -406,7 +406,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++;