[fix] Added total closing in general ledger (#11961)
diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py
index d5180a6..c275c04 100644
--- a/erpnext/accounts/report/general_ledger/general_ledger.py
+++ b/erpnext/accounts/report/general_ledger/general_ledger.py
@@ -193,6 +193,17 @@
# closing
data.append(totals.closing)
+ #total closing
+ total_closing = totals.total_closing
+ total_debit = totals.closing.get('debit', 0)
+ total_credit = totals.closing.get('credit', 0)
+ debit_in_account_currency = totals.closing.get('debit_in_account_currency', 0)
+ credit_in_account_currency = totals.closing.get('credit_in_account_currency', 0)
+
+ total_closing['debit'] = total_debit - total_credit
+ total_closing['debit_in_account_currency'] = debit_in_account_currency - credit_in_account_currency
+ data.append(totals.total_closing)
+
return data
def get_totals_dict():
@@ -207,7 +218,8 @@
return _dict(
opening = _get_debit_credit_dict(_('Opening')),
total = _get_debit_credit_dict(_('Total')),
- closing = _get_debit_credit_dict(_('Closing (Opening + Total)'))
+ closing = _get_debit_credit_dict(_('Closing (Opening + Total)')),
+ total_closing = _get_debit_credit_dict(_('Closing Balance (Dr - Cr)'))
)
def initialize_gle_map(gl_entries):