diff --git a/addons/point_of_sale/static/src/app/utils/money_details_popup/money_details_popup.js b/addons/point_of_sale/static/src/app/utils/money_details_popup/money_details_popup.js index 9fa4e281f3a..81aa6b060a4 100644 --- a/addons/point_of_sale/static/src/app/utils/money_details_popup/money_details_popup.js +++ b/addons/point_of_sale/static/src/app/utils/money_details_popup/money_details_popup.js @@ -21,10 +21,10 @@ export class MoneyDetailsPopup extends AbstractAwaitablePopup { }); } computeTotal(moneyDetails = this.state.moneyDetails) { - return Object.entries(moneyDetails).reduce( - (total, money) => total + money[0] * money[1], - 0 - ); + return Object.entries(moneyDetails).reduce((total, [value, inputQty]) => { + const quantity = isNaN(inputQty) ? 0 : inputQty; + return total + parseFloat(value) * quantity; + }, 0); } //@override async getPayload() {