From e03892b1307d6e355a7ed126055b06e69492dcbe Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 11 Jun 2019 14:17:06 +0530 Subject: [PATCH] fix: group by voucher condition for the general ledger report --- 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 881525f43d9..4bea0978025 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.py +++ b/erpnext/accounts/report/general_ledger/general_ledger.py @@ -127,7 +127,9 @@ def get_gl_entries(filters): order_by_statement = "order by posting_date, voucher_type, voucher_no" if filters.get("group_by") == _("Group by Voucher (Consolidated)"): - group_by_statement = "group by voucher_type, voucher_no, account, cost_center, against_voucher" + group_by_statement = """group by voucher_type, voucher_no, account, + cost_center, against_voucher_type, against_voucher, posting_date""" + select_fields = """, sum(debit) as debit, sum(credit) as credit, sum(debit_in_account_currency) as debit_in_account_currency, sum(credit_in_account_currency) as credit_in_account_currency"""