Merge pull request #17901 from rohitwaghchaure/general_leder_report_for_group_by_voucher_consolidated

fix: group by voucher condition for the general ledger report
This commit is contained in:
rohitwaghchaure
2019-06-11 16:17:34 +05:30
committed by GitHub

View File

@@ -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"""