Issue 11317

Title
Tax rounding when using multiple taxes results in wrong total amount
Priority
bug
Status
in-progress
Nosy list
nicoe, reviewbot, yangoon
Assigned to
nicoe
Keywords
review

Created on 2022-03-16.17:43:44 by nicoe, last changed 1 week ago by reviewbot.

Messages

Author: [hidden] (nicoe) Tryton committer
Date: 2022-03-16.17:43:44

Due to the rounding operated on each tax in the TaxableMixin's _round_taxes method a loss of precision might result in a total price that is not the correct one.

Here's an example (a bit artificial but easier to understand):

Tax1 of 10%
Tax2 of 10%
The amount tax included is 1.25, it will result in a base amount of 1.0417

The current implementation will lose 0.01 and thus the amount tax included will be 1.24.

History
Date User Action Args
2022-05-14 01:22:43reviewbotsetmessages: + msg76637
2022-04-12 16:58:58reviewbotsetmessages: + msg75733
2022-03-28 15:40:44reviewbotsetmessages: + msg74832
2022-03-25 15:35:10reviewbotsetmessages: + msg74737
2022-03-16 20:43:32yangoonsetnosy: + yangoon
2022-03-16 18:01:26reviewbotsetmessages: + msg74572
nosy: + reviewbot
2022-03-16 17:44:14nicoesetkeyword: + review
reviews: 397551005
2022-03-16 17:43:44nicoecreate

Showing 10 items. Show all history (warning: this could be VERY long)