summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2016-09-06 17:50:06 +0200
committerNicolas Martinelli <nim@odoo.com>2016-09-07 09:13:03 +0200
commit06754b3237a44d8ba2a18bf407a3e65447ca390c (patch)
treec02aa946534e111637ab068961113108b8f5631f /addons/web/static/src/js
parent8e65b57df796860a008270d8b425711d2bf88888 (diff)
[FIX] point_of_sale: tax calculation
Inconsistencies can arise between the tax calculation performed in the PoS and in the backend (e.g. in a SO). For example: - Unit price: 9.479 - Tax: excluded, 5.5 % - Buy 5 units - Round globally In the backend, the result is 47.40 + 2.60 = 50.00 In the PoS, the result is 47.40 + 2.61 = 50.01 We make the PoS apply the same logic than in the backend. First, at the level of the `compute_all` method, especially to use the appropriate rounding precision before starting the calculation (so we move the rounding of `total_excluded` after the rounding precision adjustment). Then, by calculating the taxes amount as the difference between `priceWithTax` with `priceWithoutTax`. This is mandatory since they contain the result of `compute_all` in which the rounding logic has already been applied. opw-680891
Diffstat (limited to 'addons/web/static/src/js')
0 files changed, 0 insertions, 0 deletions