diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2016-09-06 17:50:06 +0200 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2016-09-07 09:13:03 +0200 |
| commit | 06754b3237a44d8ba2a18bf407a3e65447ca390c (patch) | |
| tree | c02aa946534e111637ab068961113108b8f5631f /addons/web/static/src/js/framework | |
| parent | 8e65b57df796860a008270d8b425711d2bf88888 (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/framework')
0 files changed, 0 insertions, 0 deletions
