From ec27077d9cd5f3d5e832e35a32451cee7f5e3e6d Mon Sep 17 00:00:00 2001 From: Vishakh Desai Date: Mon, 16 Sep 2024 15:40:49 +0530 Subject: [PATCH] fix: set group_by condition if empty and voucher_no is set (cherry picked from commit a6b0cb6cac78a415caebaa9fbfd913f123842f55) --- erpnext/accounts/report/general_ledger/general_ledger.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py index 2564eb0800f2..1c1d10c087b9 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.py +++ b/erpnext/accounts/report/general_ledger/general_ledger.py @@ -35,6 +35,9 @@ def execute(filters=None): if filters.get("party"): filters.party = frappe.parse_json(filters.get("party")) + if filters.get("voucher_no") and not filters.get("group_by"): + filters.group_by = "Group by Voucher (Consolidated)" + validate_filters(filters, account_details) validate_party(filters)