diff --git a/multi_currency_payment_in_pos/README.rst b/multi_currency_payment_in_pos/README.rst old mode 100755 new mode 100644 diff --git a/multi_currency_payment_in_pos/static/src/js/backend_order.js b/multi_currency_payment_in_pos/static/src/js/backend_order.js index 414425dd8..3613f628f 100644 --- a/multi_currency_payment_in_pos/static/src/js/backend_order.js +++ b/multi_currency_payment_in_pos/static/src/js/backend_order.js @@ -17,12 +17,14 @@ odoo.define('backend_order.MultiCurrencyValues', function(require) { _save_to_server (orders, options) { if(orders.length > 0){ for (let i = 0, len = orders[0].data.statement_ids.length; i < len; i++){ - if(this.orders[0].paymentlines[i].converted_currency){ - orders[0].data.statement_ids[i][2].currency_amount = this.orders[0].paymentlines[i].converted_currency.amount - orders[0].data.statement_ids[i][2].payment_currency = this.orders[0].paymentlines[i].converted_currency.name - }else{ - orders[0].data.statement_ids[i][2].currency_amount = "" - orders[0].data.statement_ids[i][2].payment_currency = "" + if (this.orders[0].paymentlines[i]){ + if(this.orders[0].paymentlines[i].converted_currency){ + orders[0].data.statement_ids[i][2].currency_amount = this.orders[0].paymentlines[i].converted_currency.amount + orders[0].data.statement_ids[i][2].payment_currency = this.orders[0].paymentlines[i].converted_currency.name + }else{ + orders[0].data.statement_ids[i][2].currency_amount = "" + orders[0].data.statement_ids[i][2].payment_currency = "" + } } } } diff --git a/multi_currency_payment_in_pos/static/xml/multicurrency_templates.xml b/multi_currency_payment_in_pos/static/xml/multicurrency_templates.xml index 59ea7192e..2493b9aa8 100644 --- a/multi_currency_payment_in_pos/static/xml/multicurrency_templates.xml +++ b/multi_currency_payment_in_pos/static/xml/multicurrency_templates.xml @@ -30,8 +30,8 @@