Manager addition, rounding error

I’m not in a position to update ATM, my current version is 19.10.21, so it’s only marginally behind.

I am getting a float point/rounding error on addition which is applying one value to an invoice (on the edit screen, I realised later the view is correct) but another value in the supplier statement. It’s only out by one cent which tells me it’s a floating point/rounding error, but all my trying to fix it atm has been unsuccessful (and besides, I shouldn’t need to).

In my invoice I have the values:

12    x   7.8 = 93.6
6.05 x 12.9 = 78.045
3.95 x 13.5 = 53.325

On the view screen I have:

12    x   7.8 = 93.6
6.05 x 12.9 = 78.05
3.95 x 13.5 = 53.33

Now, I didn’t initially see this, and so I was trying to adjust it in the edit screen, but every edit pushed the supplier outstanding amount to one cent more than necessary.

The rounding on the edit screen and the view screen gives different results.

I don’t think they should.


What you are seeing is that the Edit screen does not round amounts of line items. The View screen rounds each line to the minimum division of the currency and then adds. Otherwise, the math on the final transaction would not work out.

you are correct, however, perhaps it should be done more accurately.

What should be present on the edit screen is the actual final amount that will appear on the view screen and elsewhere in manager (statements, summaries etc). They really shouldn’t be different.

Apparently @lubos is aware of it and would like it to be shown differently, so we can assume it will be corrected at some point (at which time, anyone who implemented adjustments to get it correct, will probably end up with incorrect entries, one of those “breaking changes”, so sadly, it’s probably best left unchanged! DOH!! lol).

@lubos, why not just round the individual line item subtotal? Wouldn’t that fix the problem?

For the edit screen total and the total as entered into the general ledger to be different is sub par, and I would consider that a bug.

I have always assumed the edit screen to be the value I need to get correct. At least now I know that value is arbitrary and I must check the view version. Annoying, very annoying, especially when you are creating another and don’t view it by default.