Rounding issue?

deleted - wrong place

What would be correct in your mind ?
making the operations manually, I find the same but for the second example which is completely wrong. Is it the problem ?

You are free to configure the number of decimal for the unit price: Configuration — trytond_product latest documentation
And you are free to choose between rounding “Per Document” or “Per Line” in the accounting configuration.

Thank you all very much for your attention. As mostly, I have to recognize, I was not precise enough. Let’s try again, take my 1st example.

Here come results from calc, without any rounding:

desc pieces item price line total
[SKR7224] Skaterrad 72x24 2 3,3613 6,7226
[RTsb24] Sondermaß Breite <24mm 1 4,2017 4,2017
[KU6362RS] Kugellager 636 2RS 4 0,8403 3,3612
[VB] Versand - Brief 1 2,521 2,521
Subtot 16,8065
VAT 3,193235
Total
19,999735

So the total sums up to 19,999735 - which IMHO should round up to 20,00 - but it does not.

With switiching to “round per line” in accounting settings, the rounding then happens nicely in all my examples. Great. Unluckily there still are other issues:

These are ordinary moves, created from a template; input was a brutto value of 29,99, the formula should account 1/2 to the company:

What tryton delivers:

3510 - Auslagen vom Gesellschafter 0 15,00
1406 - Abziehbare Vorsteuer 19 % 2,39 0
6805 - Telefon 12,60 0

So there is 1ct missing in the moves.

What calc calcs (1st line = sum of 2nd and 3rd line):

3510 - Auslagen vom Gesellschafter 0 15,00
1406 - Abziehbare Vorsteuer 19 % 2,39495798319328 0
6805 - Telefon 12,6050420168067 0

What calc calcs with 3 digits only (1st line = sum of 2nd and 3rd line):

3510 - Auslagen vom Gesellschafter 0 15,00
1406 - Abziehbare Vorsteuer 19 % 2,395 0
6805 - Telefon 12,605 0

So even 3 digits should be good enough in this example; I’ve got 4. Nevertheless, the rounding result is not what I’d expect; I think, 12,605 should round to 12,61, and not to 12,60.

Tell me if I’m riding on a wrong assumption.

This is a wrong assumption because the total amount with taxes is rounded separately because it appears in the accounting and the amount of each taxes also.

This is completely another topic.

Alright. Thank you very much for your attention.

In the end I found that this issue is much more complicated that I initially thought; even with simple invoices. And worse - my examples are full of mistakes, shame on me.

So there is not a simple “catch it all” solution to this and not a mistake in tryton, and I guess, our crazy 19% VAT makes things worse.

Cheers,
Wolf

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.