Fix applying of credit note on invoice

This commit is contained in:
Laurent Destailleur 2019-02-28 19:30:44 +01:00
parent dddf322264
commit a8f447498b

View File

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