[16.0][FIX] account_payment_term_extension: Display correct amounts in journal items when using foreign currency #780
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Detected problem:
When creating an invoice for 900EUR (in a company currency with USD) with a Payment Term with multiple terms, for example 30% now, the rest in 60 days, the journal items that are generated are displaying the amount in EUR but with USD currency.
Specifically, total invoice amount in EUR is 900, and converted to USD is 1376.
First payment should be 30% -> 412,8 USD
Second payment should be balance -> 963,2 USD
Currently, this info is displayed as:
Payment terms are being computed considering EUR currency.
As:
Correct computing should be in company's currency. This PR fixes that: