Merge pull request #13422 from OPEN-DSI/v10-fix-invoice-remain-to-pay

FIX get remain to pay with rounding decimals
This commit is contained in:
Laurent Destailleur 2020-03-25 18:26:33 +01:00 committed by GitHub
commit 74667c2943
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,7 +103,7 @@ abstract class CommonInvoice extends CommonObject
$alreadypaid+=$this->getSommePaiement($multicurrency);
$alreadypaid+=$this->getSumDepositsUsed($multicurrency);
$alreadypaid+=$this->getSumCreditNotesUsed($multicurrency);
return $this->total_ttc - $alreadypaid;
return price2num($this->total_ttc, 'MT') - price2num($alreadypaid, 'MT');
}
/**