Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][FIX] account_payment_term_extension: Display correct amounts in journal items when using foreign currency #780

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

sergiobstoj
Copy link
Member

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.

image

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:
image

Payment terms are being computed considering EUR currency.
As:

  • First payment, 30% -> 270
  • Second payment, balance -> 1106

Correct computing should be in company's currency. This PR fixes that:
image

@aritzolea
Copy link

Could you add a unit test that would not pass without this fix? Thanks

@sergiobstoj sergiobstoj force-pushed the 16.0-fix-account_payment_term_extension branch from 0c88d05 to 90c5406 Compare January 15, 2025 10:25
@sergiobstoj sergiobstoj marked this pull request as ready for review January 16, 2025 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants