diff options
| author | Antoine Prieels <anp@odoo.com> | 2020-08-25 07:10:42 +0000 |
|---|---|---|
| committer | Antoine Prieels <anp@odoo.com> | 2020-08-25 10:07:46 +0000 |
| commit | 485d27db7eaa1aa7c7007d8aa091d3c4b5114e7e (patch) | |
| tree | 93a2d8dc1ae43bbfebb90cce9f442a3ce174e017 /addons/pos_six | |
| parent | a9065ce5df330f40483284d2fdde18084006ba5f (diff) | |
[FIX] pos_six: Wrong amount sent to terminal
The Six TIM API considers all round amounts to be in minor units while
decimal amounts are considered actual amounts.
In #df01c71, we changed all payments to minor units, but we still had
problems with floating point precision.
E.g. Starting a payment of 4.60€ was converted to 460 in minor units
but due to floating point precision, the actual amount sent to TIM
was 460.00000000005. The terminal then started a payment of 460€
instead of 4.60€.
closes odoo/odoo#56489
X-original-commit: 00cc3ce75dd2efa60ad93b6ad6535020fa517781
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
Diffstat (limited to 'addons/pos_six')
| -rw-r--r-- | addons/pos_six/static/src/js/payment_six.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/pos_six/static/src/js/payment_six.js b/addons/pos_six/static/src/js/payment_six.js index 97c0934e273..debf003e876 100644 --- a/addons/pos_six/static/src/js/payment_six.js +++ b/addons/pos_six/static/src/js/payment_six.js @@ -130,7 +130,7 @@ var PaymentSix = PaymentInterface.extend({ _sendTransaction: function (transactionType) { var amount = new timapi.Amount( - this.pos.get_order().selected_paymentline.amount / this.pos.currency.rounding, + parseInt(this.pos.get_order().selected_paymentline.amount / this.pos.currency.rounding), timapi.constants.Currency[this.pos.currency.name], this.pos.currency.decimals ); |
