fix: Totals row incorrect value in GL Entry (#27867)
(cherry picked from commit ebe68c1a7a47f5e711cc9fc1d40c07e140b76888)
This commit is contained in:
parent
9916b87767
commit
21ba9ac744
@ -421,8 +421,6 @@ def get_accountwise_gle(filters, accounting_dimensions, gl_entries, gle_map):
|
|||||||
update_value_in_dict(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.get(group_by)].totals, 'total', gle)
|
|
||||||
update_value_in_dict(totals, 'total', gle)
|
|
||||||
if filters.get("group_by") != 'Group by Voucher (Consolidated)':
|
if filters.get("group_by") != 'Group by Voucher (Consolidated)':
|
||||||
gle_map[gle.get(group_by)].entries.append(gle)
|
gle_map[gle.get(group_by)].entries.append(gle)
|
||||||
elif filters.get("group_by") == 'Group by Voucher (Consolidated)':
|
elif filters.get("group_by") == 'Group by Voucher (Consolidated)':
|
||||||
@ -436,10 +434,11 @@ def get_accountwise_gle(filters, accounting_dimensions, gl_entries, gle_map):
|
|||||||
else:
|
else:
|
||||||
update_value_in_dict(consolidated_gle, key, gle)
|
update_value_in_dict(consolidated_gle, key, gle)
|
||||||
|
|
||||||
update_value_in_dict(gle_map[gle.get(group_by)].totals, 'closing', gle)
|
|
||||||
update_value_in_dict(totals, 'closing', gle)
|
|
||||||
|
|
||||||
for key, value in consolidated_gle.items():
|
for key, value in consolidated_gle.items():
|
||||||
|
update_value_in_dict(gle_map[value.get(group_by)].totals, 'total', value)
|
||||||
|
update_value_in_dict(totals, 'total', value)
|
||||||
|
update_value_in_dict(gle_map[value.get(group_by)].totals, 'closing', value)
|
||||||
|
update_value_in_dict(totals, 'closing', value)
|
||||||
entries.append(value)
|
entries.append(value)
|
||||||
|
|
||||||
return totals, entries
|
return totals, entries
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user