fix: dimension name in remark
diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py
index eacb318..a348911 100644
--- a/erpnext/accounts/general_ledger.py
+++ b/erpnext/accounts/general_ledger.py
@@ -66,15 +66,16 @@
offsetting_entries = []
for gle in gl_map:
for dimension in accounting_dimensions_to_offset:
- offsetting_account = dimension.offsetting_account
offsetting_entry = gle.copy()
+ debit = flt(gle.credit) / no_of_dimensions if gle.credit != 0 else 0
+ credit = flt(gle.debit) / no_of_dimensions if gle.debit != 0 else 0
offsetting_entry.update(
{
- "account": offsetting_account,
- "debit": flt(gle.credit) / no_of_dimensions if gle.credit != 0 else 0,
- "credit": flt(gle.debit) / no_of_dimensions if gle.debit != 0 else 0,
- "debit_in_account_currency": flt(gle.credit) / no_of_dimensions if gle.credit != 0 else 0,
- "credit_in_account_currency": flt(gle.debit) / no_of_dimensions if gle.debit != 0 else 0,
+ "account": dimension.offsetting_account,
+ "debit": debit,
+ "credit": credit,
+ "debit_in_account_currency": debit,
+ "credit_in_account_currency": credit,
"remarks": _("Offsetting for Accounting Dimension") + " - {0}".format(dimension.name),
"against_voucher": None,
}
@@ -91,7 +92,7 @@
frappe.qb.from_(acc_dimension)
.inner_join(dimension_detail)
.on(acc_dimension.name == dimension_detail.parent)
- .select(acc_dimension.fieldname, dimension_detail.offsetting_account)
+ .select(acc_dimension.fieldname, acc_dimension.name, dimension_detail.offsetting_account)
.where(
(acc_dimension.disabled == 0)
& (dimension_detail.company == company)