fix: Add accounting dimensions for round off GL Entry
diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py
index 4dbc4d6..2d36835 100644
--- a/erpnext/accounts/general_ledger.py
+++ b/erpnext/accounts/general_ledger.py
@@ -392,10 +392,22 @@
}
)
+ update_accounting_dimensions(round_off_gle)
+
if not round_off_account_exists:
gl_map.append(round_off_gle)
+def update_accounting_dimensions(round_off_gle):
+ dimensions = get_accounting_dimensions()
+ dimension_values = frappe.db.get_value(
+ round_off_gle["voucher_type"], round_off_gle["voucher_no"], dimensions
+ )
+
+ for dimension in dimensions:
+ round_off_gle[dimension] = dimension_values.get(dimension)
+
+
def get_round_off_account_and_cost_center(company, voucher_type, voucher_no):
round_off_account, round_off_cost_center = frappe.get_cached_value(
"Company", company, ["round_off_account", "round_off_cost_center"]