[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#61097

X-original-commit: 792ebaf8494a42f91e4251acf2f74f89ff9f5e6e
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
This commit is contained in:
IEL
2020-10-30 18:57:19 +00:00
parent 0e4642db8f
commit 89e9ebdccf
+1 -1
View File
@@ -3262,7 +3262,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) {