summaryrefslogtreecommitdiff
path: root/addons/analytic_user_function/analytic_user_function_view.xml
diff options
context:
space:
mode:
authorDenis Ledoux <dle@odoo.com>2015-07-09 11:46:32 +0200
committerDenis Ledoux <dle@odoo.com>2015-07-09 11:51:40 +0200
commit7c2521a79bc9443adab1bc63007e70661a8c22b7 (patch)
treeec8a21e8096c6f2add6fd79900fef51e87e5eb02 /addons/analytic_user_function/analytic_user_function_view.xml
parentf3e4d0a2e82a7effda2be76bb90ca5353da9d6ee (diff)
[FIX] payment_ogone: amount rounding issue
The amount to pay must be sent without comma to ogone. e.g., for 66.99 EUR, the amount sent must be 6699. To do that, we simply applied 66.99 * 100, which seems rather good. However, due to the fact how floats are handled in computers, `66.99 * 100` returns 6698.999999999999 and `int(6698.999999999999)` returns 6698 while we expected 6699 Using `float_repr` with `0` as decimal precision instead of using `int` solves this issue. `float_repr(6698.999999999999, 0)` returns 6699, as expected.
Diffstat (limited to 'addons/analytic_user_function/analytic_user_function_view.xml')
0 files changed, 0 insertions, 0 deletions