From b3b7e62a9016a1976946008627ad1887158b1f2d Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 16:18:34 +0530 Subject: [PATCH] fix: consolidate gl entries by project in General Ledger Report (backport #46314) (#46320) fix: consolidate gl entries by project in General Ledger Report (#46314) (cherry picked from commit 1f685efcaf01d11583b7c0f23a4e2f35a32dce92) Co-authored-by: Lakshit Jain <108322669+ljain112@users.noreply.github.com> --- erpnext/accounts/report/general_ledger/general_ledger.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py index aa06dffb043..25d52998449 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.py +++ b/erpnext/accounts/report/general_ledger/general_ledger.py @@ -506,6 +506,7 @@ def get_accountwise_gle(filters, accounting_dimensions, gl_entries, gle_map): for dim in accounting_dimensions: keylist.append(gle.get(dim)) keylist.append(gle.get("cost_center")) + keylist.append(gle.get("project")) key = tuple(keylist) if key not in consolidated_gle: @@ -617,10 +618,11 @@ def get_columns(filters): {"label": _("Against Account"), "fieldname": "against", "width": 120}, {"label": _("Party Type"), "fieldname": "party_type", "width": 100}, {"label": _("Party"), "fieldname": "party", "width": 100}, - {"label": _("Project"), "options": "Project", "fieldname": "project", "width": 100}, ] if filters.get("include_dimensions"): + columns.append({"label": _("Project"), "options": "Project", "fieldname": "project", "width": 100}) + for dim in get_accounting_dimensions(as_list=False): columns.append( {"label": _(dim.label), "options": dim.label, "fieldname": dim.fieldname, "width": 100}