Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 5.11.2
-
Component/s: None
-
Labels:None
Description
To reproduce:
- Make sure USD has a precision of 2
- Create an invoice with a qty of 100 and a price of 0.005
- See the total is $10 instead of $5
To resolve:
around line 170 change
$line['amount'] = $this->Currencies->toDecimal(
$line['amount'],
$vars['currency']
);
to
$line['amount'] = $this->Currencies->toDecimal( $line['amount'], $vars['currency'], null, 4 );
Same around line 655