From b06bd825c19a5d1c1aeb3ade1a5dda65a7f2286f Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2025 14:49:27 +0530 Subject: [PATCH] fix: correct amount in transaction currency for reverse gl entries (backport #45794) (#45849) fix: correct amount in tansaction currency for reverse gl entries (cherry picked from commit 6077c248b021c4123dadf3878fb071dab457a469) Co-authored-by: ljain112 --- erpnext/accounts/general_ledger.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index e5e43aefa32..7d0bf2cca11 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -680,11 +680,15 @@ def make_reverse_gl_entries( debit_in_account_currency = new_gle.get("debit_in_account_currency", 0) credit_in_account_currency = new_gle.get("credit_in_account_currency", 0) + debit_in_transaction_currency = new_gle.get("debit_in_transaction_currency", 0) + credit_in_transaction_currency = new_gle.get("credit_in_transaction_currency", 0) new_gle["debit"] = credit new_gle["credit"] = debit new_gle["debit_in_account_currency"] = credit_in_account_currency new_gle["credit_in_account_currency"] = debit_in_account_currency + new_gle["debit_in_transaction_currency"] = credit_in_transaction_currency + new_gle["credit_in_transaction_currency"] = debit_in_transaction_currency new_gle["remarks"] = "On cancellation of " + new_gle["voucher_no"] new_gle["is_cancelled"] = 1