fix(general_ledger): Order by in case Group by Account (#28093)

* Update general_ledger.py

Fix order_by_statement if filter group by: Group by Account

* chore: whitespace

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
This commit is contained in:
hendrik 2021-10-27 16:08:20 +07:00 committed by GitHub
parent af9ead84e9
commit f24ed6723e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -155,6 +155,8 @@ def get_gl_entries(filters, accounting_dimensions):
if filters.get("group_by") == "Group by Voucher":
order_by_statement = "order by posting_date, voucher_type, voucher_no"
if filters.get("group_by") == "Group by Account":
order_by_statement = "order by account, posting_date, creation"
if filters.get("include_default_book_entries"):
filters['company_fb'] = frappe.db.get_value("Company",