From 9e1ef0155420e00beb254ef6e699cf3c9b195c27 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 17 Mar 2025 20:28:34 +0530 Subject: [PATCH] fix: set correct currency for offset account gl entries --- erpnext/accounts/general_ledger.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index 202e4b46b4..83d6b25af2 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -80,6 +80,10 @@ def make_acc_dimensions_offsetting_entry(gl_map): "credit_in_account_currency": credit, "remarks": _("Offsetting for Accounting Dimension") + " - {0}".format(dimension.name), "against_voucher": None, + "account_currency": dimension.account_currency, + # Party Type and Party are restricted to Receivable and Payable accounts + "party_type": None, + "party": None, } ) offsetting_entry["against_voucher_type"] = None @@ -107,6 +111,9 @@ def get_accounting_dimensions_for_offsetting_entry(gl_map, company): accounting_dimensions_to_offset = [] for acc_dimension in acc_dimensions: values = set([entry.get(acc_dimension.fieldname) for entry in gl_map]) + acc_dimension.account_currency = frappe.get_cached_value( + "Account", acc_dimension.offsetting_account, "account_currency" + ) if len(values) > 1: accounting_dimensions_to_offset.append(acc_dimension) -- GitLab