The patch from this thread does not work for me, after applying the patch in fresh installed 5.0.6 I noticed strange behavior of the pay invoice wizard. In my scenario - company currency CHF, invoice currency EUR, payment journal currency CHF - the payment wizard ignores the journal currency and calculates using invoice currency. Now I have in my bank journal, that is defined as CHF currency journal, entries in both CHF and EUR!
you find code snippet from Jan Verlaan for better _amount_residual calculation. This 'patch' works for multiple currencies, when the rate does not change between invoice date and payment date. To be perfect the debit/credit calculation in the _amount residual function must apply the currency rate changes. In code it means the debit/credit values in inv.move_lines must respect the currency rate changes.
IMO the problem is in the _amount_residual calculation.
The patch from this thread does not work for me, after applying the patch in fresh installed 5.0.6 I noticed strange behavior of the pay invoice wizard. In my scenario - company currency CHF, invoice currency EUR, payment journal currency CHF - the payment wizard ignores the journal currency and calculates using invoice currency. Now I have in my bank journal, that is defined as CHF currency journal, entries in both CHF and EUR!
In my original thread
https:/ /bugs.launchpad .net/bugs/ 461617
you find code snippet from Jan Verlaan for better _amount_residual calculation. This 'patch' works for multiple currencies, when the rate does not change between invoice date and payment date. To be perfect the debit/credit calculation in the _amount residual function must apply the currency rate changes. In code it means the debit/credit values in inv.move_lines must respect the currency rate changes.
IMO the problem is in the _amount_residual calculation.