Closed rven closed 9 years ago
@rven your fix doesn't make sense. If you look to the code of the amount_to_pay method than you'll see that the amount_residual_currency is taken. But there is extra logic in this function that would be lost with your PR: the amount_to_pay method also takes into account unreconciled payment lines to avoid paying twice the same amount.
I have tested the import of an invoice made in USD and the correct amount was imported. Can you give me an EXACT use case where the amount_to_pay function does the wrong calculation so that I can reproduce and fix the issue ? Tx, Luc
@luc-demeyer
I did not have the latest version of the module. I'll test it again with the latest version.
When creating a payment order, from imported invoices in another currency then the company invoice, the incorrect amount is taken to create the payment order.