diff options
| author | IEL <iel@odoo.com> | 2020-10-29 16:14:13 +0000 |
|---|---|---|
| committer | IEL <iel@odoo.com> | 2020-10-30 18:33:11 +0000 |
| commit | 5c79992f1f0f1b5a8ac4c1f464347abc10a6d8d8 (patch) | |
| tree | e71cbcf714987e7bc13803e040ab9f57b251dbf2 /addons/point_of_sale/static/src | |
| parent | 62bd58fdef0e1e3a4dae4c9acae8023488798aef (diff) | |
[FIX] pos_cash_rounding: fixup float_is_zero usage
WHY:
* float_is_zero doesn't work without second argument
https://github.com/odoo/odoo/blob/c90427dfba26854cda5d54f813cccc4948685077/addons/web/static/src/js/core/utils.js#L59-L62
* the fixed line of code was introduced in #60642
closes odoo/odoo#61094
X-original-commit: 792ebaf8494a42f91e4251acf2f74f89ff9f5e6e
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
Diffstat (limited to 'addons/point_of_sale/static/src')
| -rw-r--r-- | addons/point_of_sale/static/src/js/models.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index 65a5c89fcfb..b7f34c4032c 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -3287,7 +3287,7 @@ exports.Order = Backbone.Model.extend({ var rounding_applied = total - (this.pos.config['iface_tax_included'] === "total"? this.get_subtotal(): this.get_total_with_tax()); // because floor and ceil doesn't include decimals in calculation, we reuse the value of the half-up and adapt it. - if (utils.float_is_zero(rounding_applied)){ + if (utils.float_is_zero(rounding_applied, this.pos.currency.decimals)){ // https://xkcd.com/217/ return 0; } else if(this.pos.cash_rounding[0].rounding_method === "UP" && rounding_applied < 0) { |
