Closed PCatinean closed 4 years ago
When a sale_order_line with the following data is present on a sale.order it computes a negative discount which prevents the payment from going through.
{ 'discountAmount': {'currency': 'EUR', 'value': '-0.02'}, 'quantity': 2, 'totalAmount': {'currency': 'EUR', 'value': '32.23'}, 'type': 'physical', 'unitPrice': {'currency': 'EUR', 'value': '16.11'}, 'vatAmount': {'currency': 'EUR', 'value': '5.15'}, 'vatRate': '19.00' }
This is issue is because the total value 32.23 is divided by the qty (2) which results in 16,115.
Mollie's line.price_unit_taxinc returns 16.11 and line.price_unit_taxinc is 16.12 giving us the negative discount.
Tested https://github.com/mollie/mollie-odoo/pull/66 in staging and this seems to have fixed the problem! Discount is now 0 again :) thank you!
@PCatinean Thank you for test.
When a sale_order_line with the following data is present on a sale.order it computes a negative discount which prevents the payment from going through.
This is issue is because the total value 32.23 is divided by the qty (2) which results in 16,115.
Mollie's line.price_unit_taxinc returns 16.11 and line.price_unit_taxinc is 16.12 giving us the negative discount.