fix: Merge debit and credit in transaction currency while merging gle with similar head

(cherry picked from commit e43697d359)
This commit is contained in:
Nabin Hait
2024-04-29 17:01:48 +05:30
committed by Mergify
parent bba738f5f4
commit 9a58823867
2 changed files with 49 additions and 0 deletions

View File

@@ -238,10 +238,16 @@ def merge_similar_entries(gl_map, precision=None):
same_head.debit_in_account_currency = flt(same_head.debit_in_account_currency) + flt(
entry.debit_in_account_currency
)
same_head.debit_in_transaction_currency = flt(same_head.debit_in_transaction_currency) + flt(
entry.debit_in_transaction_currency
)
same_head.credit = flt(same_head.credit) + flt(entry.credit)
same_head.credit_in_account_currency = flt(same_head.credit_in_account_currency) + flt(
entry.credit_in_account_currency
)
same_head.credit_in_transaction_currency = flt(same_head.credit_in_transaction_currency) + flt(
entry.credit_in_transaction_currency
)
else:
merged_gl_map.append(entry)