Goffin Simon 74706e9e03 [FIX]payment_paypal: wrong fees computation
Steps to reproduce the bug:
- Create a product P with price=100€
- Configure payment aquier Paypal with fees_int_fixed = 1€ and fees_int_var = 1%
- Set Paypal to be available in the website
- Go to the web shop and add P in the cart
- Choose to pay with Paypal

Bug:

The amout to pay was 102.02€ instead of 102.01€

Before the fix, the fees was computed as followed:

fees = (percentage / 100.0 * amount + fixed) / (1 - percentage / 100.0)
Where fees_dom_fixed = fixed and fees_int_var = percentage

With this computation, the percentage was applied twice.
If for example, we had fixed = 0 then

fees = (percentage / 100.0 * amount) / (1 - percentage / 100.0)

In this case, it's easy to see that the percentage is applied twice.

opw:1981784

closes odoo/odoo#33830

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-06-04 07:24:34 +00:00
…
2018-10-09 13:44:38 +00:00
…
…
2019-03-13 15:10:02 +00:00

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

Then follow the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%