Merge pull request #17899 from rohitwaghchaure/general_ledger_group_by_voucher_consolidated_issue_develop

fix: debit and credit showing in the same row if the group by is set as group by voucher (consolidated)
This commit is contained in:
rohitwaghchaure 2019-06-11 11:39:48 +05:30 committed by GitHub
commit ba715feb7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -128,7 +128,7 @@ 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"
group_by_statement = "group by voucher_type, voucher_no, account, cost_center, against_voucher"
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"""