Skip to content

fix: Account Report / Account Currency Filter #47643

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

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

0xD0M1M0
Copy link
Contributor

@0xD0M1M0 0xD0M1M0 commented May 20, 2025

Do not convert the account currency via the company currency if the account currency is the same as the presentation currency.

len(account_currencies) == 1 introduced by #25654 seems not be necessary and creates issues, when viewing the balance sheet for example in the account currency, which is not the company currency. In this case the old behavior with len(account_currencies) == 1 was, that the account debit/credit in the account currency was recalculated based on the company currency giving a difference to the actual account debit/credit.

Company Currency = EUR
Account Currency = USD

Old balance sheet view in EUR:

  • Account has 100 USD which is shown correctly converted to EUR

Old balance sheet view in USD:

  • Account has 100 USD which is converted via the EUR value on the account instead of taking the real 100 USD value to present

New balance sheet view in EUR:

  • Account has 100 USD which is shown correctly converted to EUR

New balance sheet view in USD:

  • Account has 100 USD which is NOT converted showing 100 USD

@0xD0M1M0 0xD0M1M0 requested a review from ruthra-kumar as a code owner May 20, 2025 13:25
@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label May 20, 2025
@0xD0M1M0
Copy link
Contributor Author

Please backport to minimum version-15-hotfix

@ruthra-kumar
Copy link
Member

ruthra-kumar commented May 27, 2025

@0xD0M1M0

This is not as easy of a fix as it might look.
Recalculating from base currency debit and credit for all accounts ensures the total debit and credit match in the presentation currency.

This can be easily tested.

  1. Create a USD invoice (against a USD account) with a different exchange rate than the actual real-time exchange rate
  2. Look at General Ledger of that invoice with and without your change with presentation currency set to USD

@ruthra-kumar ruthra-kumar marked this pull request as draft May 27, 2025 09:36
@0xD0M1M0
Copy link
Contributor Author

@ruthra-kumar

I created a simplied Balance Sheet and two Purchase Invoices. Details in the picture:
grafik

Without this PR E8 is showing a converted amount with the company wide 0,7 conversation rate. But if you think of a bank account, your bank account does not have 128,571 USD on it, but 100 USD. Your accounting assumes that you have 90 EUR as converted currency on your account, but still it is worth 100 USD. There is no need to convert this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport version-15-hotfix needs-tests This PR needs automated unit-tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants