From 2a9dc9019a4c08efc717aa28acc8a1ddb032d5de Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 15 Dec 2017 19:40:55 +0530 Subject: [PATCH] Fixed closing debit/credit in general ledger report --- erpnext/accounts/report/general_ledger/general_ledger.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py index c275c04721..f169b9920b 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.py +++ b/erpnext/accounts/report/general_ledger/general_ledger.py @@ -245,6 +245,9 @@ def get_accountwise_gle(filters, gl_entries, gle_map): if gle.posting_date < from_date or cstr(gle.is_opening) == "Yes": update_value_in_dict(gle_map[gle.account].totals, 'opening', gle) update_value_in_dict(totals, 'opening', gle) + + update_value_in_dict(gle_map[gle.account].totals, 'closing', gle) + update_value_in_dict(totals, 'closing', gle) elif gle.posting_date <= to_date: update_value_in_dict(gle_map[gle.account].totals, 'total', gle) @@ -254,8 +257,8 @@ def get_accountwise_gle(filters, gl_entries, gle_map): else: entries.append(gle) - update_value_in_dict(gle_map[gle.account].totals, 'closing', gle) - update_value_in_dict(totals, 'closing', gle) + update_value_in_dict(gle_map[gle.account].totals, 'closing', gle) + update_value_in_dict(totals, 'closing', gle) return totals, entries