Merge pull request #8917 from atm-gauthier/6.0_fix_apply_reduc

FIX : sometimes amounts are identical but php find them different.
This commit is contained in:
Laurent Destailleur 2018-06-13 20:34:59 +02:00 committed by GitHub
commit b5cd722eb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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++;