Wrong amount to pay in case a statement origin is added as invoice payment line
Steps to reproduce:
- Activate
account_invoice
,account_payment_clearing
modules. - Create a invoice of 1000€
- Create a payment of 999€ linked to pay the invoice. Use a payment journal with a clearing account set.
- Process and success the payment
- Open the invoice, you should see 1€ as amount to pay.
- Click the
+
icon on the payment lines, so the clearing line is linked to the invoice.
Current behaviour:
- The amount to pay is updated to -998€
Expected behaviour:
- The amount to pay is 1€