Rounding seems to occur when the total is calculated, whereas rounding should occur for each line:

round(164*1.05) != 164+round(164*0.05)

see enclosed image taken from an expense report.

Comments

juliangb’s picture

There's also an issue here, which is that values are rounded on display rather than on save to the database. This potentially means that aggregates could be wrong.

The difficulty we've had with this previously is that different currencies have different numbers of decimals, although most have 2.

I think we should add a variable and appropriate admin setting for the number of decimals, then this value should be used before save, and before addition.

alberto56’s picture

@juliangb I found that issue: #686362: Allow calculation of total to use rounded tax amounts, and other invoice processing, we were both involved in that one too...

juliangb’s picture

Status: Active » Closed (duplicate)

Thanks for that link. Let's bring over that issue as it has much more discussion.

(And let's see if, 4.5 years after you first reported this, we can solve this relatively soon).