[6.1]Rounding issues with invoices
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Confirmed
|
Low
|
OpenERP Publisher's Warranty Team |
Bug Description
We're trying to integrate the invoices of the account module with another platform, but we've been having many problems related to the calculation of totals and subtotals.
I've reproduced the problem with a very simple invoice on a clean database, with just the base modules + account installed. Attached is a screenshot, but the situation is simple: we have a product with a price of 5.35€ and a 50% discount, so OpenERP calculates a line subtotal of 2.67€.
Unfortunately, this is not a reasonable value, since 5.35/2 is 2.675€, which should be - and is on the platform we're trying to integrate - 2.68€.
(You can check on WolframAlpha: http://
While the difference seems small, the accumulation of such errors is enough to cause problems, especially since accounting and payments are involved.
Changed in openobject-server: | |
status: | New → Confirmed |
status: | Confirmed → New |
affects: | openobject-server → openobject-addons |
tags: |
added: 6.1 removed: accounting rounding |
Changed in openobject-addons: | |
assignee: | nobody → OpenERP Publisher's Warranty Team (openerp-opw) |
importance: | Undecided → Low |
ThinkOpen,
We just faced this issue suddenly on a live database where we started applying x.y% discounts via pricelist.
We actually faced them on bank statements.
You will always get such errors if your amounts are x.33333, x.6666.
In order to fix, we propose these ways:
1. Set Account decimal accuracy to be 4, which is an accurate solution.
-- We could not move on with this solution because our accountants do not need 4accuracy on reports and also on view.
2. Round every ugly looking float value to 4 (when its a price subtotal) and when used in making accounting entries, get them rounded by 2.
-- We could not enjoy the solution because our values are uglier.
3. Have an account that stores your difference, could it be 0.01,0.002, etc. Knowingly you wanna reconcile them, let them through validated and reconciled.
Hope this helps.
Thanks.