[account] Rounding regression with invoices even in a basic case (5.0)

Bug #483583 reported by Dukai Gábor
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Undecided
Unassigned

Bug Description

Hi!
Version 5.0 latest bzr.
Standard 2 digits precision. Percent type tax used with 18%. An invoice with one line gives different tax amount than a 13-line invoice with the same net total. (0,01 difference)

1.Creating a supplier invoice with one line 58630.
Net total: 58630
Tax 58630 x 0.18 = 10553.4
Total 58630 + 10553.4 = 69183.4
OK

2. Creating a supplier invoice with 13 lines but the same net total:
qty x unit price, all lines with the 18% tax
65 x 112
20 x 82.8
20 x 85
144 x 30.6
150 x 84
20 x 137.7
12 x 144
15 x 88
96 x 65.5
48 x 120.6
30 x 82
36 x 213
24 x 124.2
Net total: 58630
Tax: 10553.39 ERROR!
Total: 58630 + 10553.39 = 69183.39

Revision history for this message
Ferdinand (office-chricar) wrote :

in Austria:
for supplier invoices the following has to be achieved
net, vat and total have to conform to the numbers on suppliers invoice.
currently only the total is checked to achieve matching values for - sometimes multiple rates - vat amounts is not self evident.
a more user friendly solution would be desirable

Revision history for this message
Dukai Gábor (gdukai) wrote :

If the vat is not correct on the supplier invoice, how do you calculate periodical legal vat reports?

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hello,

Would you please start the server with price_accuracy option?

Thank you.

Revision history for this message
Dukai Gábor (gdukai) wrote :

Hello,

I've tried with --price_accuracy=2 but still both the purchase order and the supplier invoice have the .39 tax amounts.

Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) wrote :

Hello,

I have checked your problem and it is solved by start the server with price_accuracy more then 2 (like --price-accuracy=4 ).

Hope this will help you.

Thank you.

Revision history for this message
Dukai Gábor (gdukai) wrote :

I've tried your suggestion but only the purchase order's tax amount has been corrected to .40. The newly generated supplier invoice still has .39. The bug is still present.

Not to speak about the fact that in some places numbers with 4-digit fractional part popped up. 2-digit and 4-digit fractional part numbers mixed. One thing is that this looks very low-end. The other thing is that if I upgrade the database, OpenERP will store 4-digit fractional part numbers and that's not acceptable where the company uses only 2.

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hello Dukai,

We agree that there is no such digit precision specified on dynamic terms, its always a float if you do not define digits to the float field.

However, it has bee corrected by revision 2451 <email address hidden>.

Hope it helps.

Thank you for your patience everyone.

Changed in openobject-addons:
status: New → Fix Released
Revision history for this message
Dukai Gábor (gdukai) wrote :

Thank you for all your effort.

I have re-thought the problem and now I consider reporting this bug as a mistake.

Reasoning:
Net total x Tax = .40 result
Sum(Subtotal x Tax) = .39 result

The .39 result (OpenERP's behavior) is the correct one because that is the result that can be achieved by adding up the line subtotals' taxes with a calculator.
The reference system I used in this case had the wrong calculation not OpenERP.

Sorry for the inconvenience.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.