mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 02:01:21 +00:00
Fixed closing debit/credit in general ledger report
This commit is contained in:
@@ -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":
|
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(gle_map[gle.account].totals, 'opening', gle)
|
||||||
update_value_in_dict(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:
|
elif gle.posting_date <= to_date:
|
||||||
update_value_in_dict(gle_map[gle.account].totals, 'total', gle)
|
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:
|
else:
|
||||||
entries.append(gle)
|
entries.append(gle)
|
||||||
|
|
||||||
update_value_in_dict(gle_map[gle.account].totals, 'closing', gle)
|
update_value_in_dict(gle_map[gle.account].totals, 'closing', gle)
|
||||||
update_value_in_dict(totals, 'closing', gle)
|
update_value_in_dict(totals, 'closing', gle)
|
||||||
|
|
||||||
return totals, entries
|
return totals, entries
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user