fix: fetch accounting dimension details specific to company
diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py
index ed6122c..334e8b0 100644
--- a/erpnext/accounts/doctype/journal_entry/journal_entry.py
+++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py
@@ -915,10 +915,11 @@
 		for dimension in accounting_dimensions:
 			dimension_details = frappe.db.get_values(
 				"Accounting Dimension Detail",
-				{"parent": dimension},
+				{"parent": dimension, "company": self.company},
 				["automatically_post_balancing_accounting_entry", "offsetting_account"],
-			)[0]
-			if dimension_details[0] == 1:
+			)
+			dimension_details = dimension_details[0] if len(dimension_details) > 0 else None
+			if dimension_details and dimension_details[0] == 1:
 				offsetting_account = dimension_details[1]
 				gl_map.append(
 					self.get_gl_dict(
@@ -939,9 +940,7 @@
 							),
 							"against_voucher_type": d.reference_type,
 							"against_voucher": d.reference_name,
-							"remarks": _(
-								"Offsetting for Accounting Dimension - {dimension}".format(dimension=dimension)
-							),
+							"remarks": _("Offsetting for Accounting Dimension") + " - {0}".format(dimension),
 							"voucher_detail_no": d.reference_detail_no,
 							"cost_center": d.cost_center,
 							"project": d.project,