From 58c040cffb503b6b9ae192a2e4af0530ab0aecfe Mon Sep 17 00:00:00 2001 From: Cesar Date: Mon, 29 Jan 2018 11:57:15 +0100 Subject: [PATCH] Revert "Sort by account name" This reverts commit 5cf01d9702b5f56a543f8e2ccf2fdfeb81bc514b. --- erpnext/accounts/report/trial_balance/trial_balance.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/report/trial_balance/trial_balance.py b/erpnext/accounts/report/trial_balance/trial_balance.py index ba6d00b68d..9eea472086 100644 --- a/erpnext/accounts/report/trial_balance/trial_balance.py +++ b/erpnext/accounts/report/trial_balance/trial_balance.py @@ -52,7 +52,7 @@ def validate_filters(filters): def get_data(filters): accounts = frappe.db.sql("""select name, parent_account, account_name, root_type, report_type, lft, rgt - from `tabAccount` where company=%s order by account_name,lft""", filters.company, as_dict=True) + from `tabAccount` where company=%s order by lft""", filters.company, as_dict=True) company_currency = erpnext.get_company_currency(filters.company) if not accounts: @@ -168,8 +168,7 @@ def accumulate_values_into_parents(accounts, accounts_by_name): def prepare_data(accounts, filters, total_row, parent_children_map, company_currency): data = [] - tmpacnt = sorted(accounts) - accounts = tmpacnt + for d in accounts: has_value = False row = {