Rounding error prevents order from being paid
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
New
|
Undecided
|
Unassigned |
Bug Description
I am using Windows Server 2003 with OpenERP 7.0
A rounding error is preventing orders from being marked as 'paid' and leaves them in 'draft' state, further preventing users from being able to close their register sessions.
Here is the example scenario, reproduced on a clean install:
OpenERP 7.0 with Point of Sale Module, United States accounting package and tax rate set to 9.0%
Test product named 'Rounding Error' with price $2.50 and 'Customer Taxes' 9.0%
Expected tax cost should be $2.50 * 0.09 = $0.225 ($0.23)
In Point of Sale module, create a new session and add the 'Rounding Error' item qty 1.
Taxes on screen will calculate at $0.23 and total will be $2.73, the customer is charged correctly and pays exact cash $2.73.
Once you receive and validate the payment, the order total (pos_order_
In the 'Orders' section under 'Point of Sale', there will be the open order which has status set to 'New'.
To fix the records manually in the database:
In pos_order_line table, find the record with price_subtotal_incl = 2.72 and update it to 2.73
In pos_order table, find the record with the corresponding id equal to the record above's pos_order_
The user can now close the session and the order line will no longer show highlighted blue with status 'New'.
I think the error may be similar to this previously reported bug with the addons/
https:/
Please let me know if you need any further information, I can provide screenshots as well.
Thank you!
UPDATE:
I've been able to workaround the error by changing the Settings -> Accounting\
I've also tested the following line of code added to account.py compute_all function:
line 2156: tax_compute_
This fixed the rounding error with the $2.50 and $5.50 amount, however now the amount $4.83 was causing a rounding error. Actual tax should be $4.83 * 0.09 = 0.4347 ($0.43). The customer was charged $5.26 correctly however the amount recorded to the database was $5.27.
Leaving the option set to 'Round Globally' resolved the rounding error for that amount as well.
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
This also affects line items with value 5.50, example:
In the same scenario above, create a new product with price $5.50 and Customer Tax 9.0%
Actual tax cost should be $5.50 * .09 = $.0495 ($0.50)
Customer is being charged taxes correctly, however the price_subtotal_incl value is stored as $5.99 instead of $6.00