Bug: Ambiguous join conditions in General Ledger report

I noticed that the join conditions for the General Ledger report between tabGL Entry and tabJournal Entry Account are ambiguous. Currently it is a left join matching jea.parent to ge.voucher_no, jea.debit to ge.debit, and jea.credit to ge.debit.

Consider the following scenario:

User creates a multicurrency journal where the account currency of the debit is $10 and the company currency value is £8. Within the same journal there is a separate debit to a different account also for £8. Given the above join conditions, when looking at the ledger for the multicurrency account the query will return a match for both the $10 debit and the £8 debit (same parent/voucher_no, same debit, same credit). Due to the grouping, this will result in a doubling of the debit in both currencies so the GL Report will show the journal for the multicurrency account as $20 and £16.

This can be fixed by adding an additional join condition of jea.account = ge.account.

Can you share the file, I am not found such query in general_ledger.py file.
Did you made any changes in the code?

Ah yes you’re right, my mistake. I’d made changes to include the journal description in the report.