Bug: GL entries for Journal Entry aggregated

When submitting a Journal Entry that has postings to the same account and cost center multiple times, the GL Entry for that account will be aggregated. This means that on the General Ledger view, we cannot see the individual movements, so have to drill down into the journal to make sure certain things have been submitted.

For example:

Journal:
Credit - Pension Control - Group - Employees Pension
Credit - Pension Control - Group - Employers Pension
Debit - Payroll Liabilities - Group - Employees Pension
Debit - Payroll Liabilities - Group - Employers Pension

GL Entry:
Credit - Pension Control - Group
Debit - Payroll Liabilities - Group

This means we can’t separate Employees Pension and Employers Pension in ledger reports.

I’ve tried to look at the code and it seems the GL entries are made using account as key so I don’t see an easy fix for this. Does anyone have any insight?

In erpnext/accounts/general_ledger.py, change merge_entries=True in the make_gl_entries function to merge_entries=False.

Don’t know if this will cause issues though. Test thoroughly.

1 Like

I actually did this, it did the job but as you say I’ll need to test thoroughly. Thanks.

Please report back after testing.

I am of the opinion that this behavior should be toggle-able in Accounts Settings rather than having to hard code the change.

Please do send a pull request if you are able to.

I haven’t seen any issues with this change, and it makes the General Ledger much easier to follow.

I don’t know how to introduce a toggle so I won’t be able to make a pull request for this feature.