diff --git a/addons/point_of_sale/static/src/app/number_buffer_service.js b/addons/point_of_sale/static/src/app/number_buffer_service.js index abfc054c29c..e28972ac221 100644 --- a/addons/point_of_sale/static/src/app/number_buffer_service.js +++ b/addons/point_of_sale/static/src/app/number_buffer_service.js @@ -286,7 +286,11 @@ class NumberBuffer extends EventBus { // when input is like '+10', '+50', etc const inputValue = oParseFloat(input.slice(1)); const currentBufferValue = this.state.buffer ? oParseFloat(this.state.buffer) : 0; - this.state.buffer = this.component.env.pos.formatFixed(inputValue + currentBufferValue); + // FIXME POSREF: the `buffer` shouldn't be dependent on the currency. + this.state.buffer = this.component.env.utils.formatCurrency( + inputValue + currentBufferValue, + false + ); } else if (!isNaN(parseInt(input, 10))) { if (this.state.toStartOver) { // when we want to erase the current buffer for a new value diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index a3ba8834436..ba15045a827 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -1508,16 +1508,6 @@ export class PosGlobalState extends PosModel { return parseFloat(round_di(value, decimals).toFixed(decimals)); } - /** - * (value = 1.0000, decimals = 2) => '1' - * (value = 1.1234, decimals = 2) => '1.12' - * @param {number} value amount to format - */ - formatFixed(value) { - const currency = this.currency || { decimal_places: 2 }; - return `${Number(value.toFixed(currency.decimal_places || 0))}`; - } - disallowLineQuantityChange() { return false; }