Merge pull request #42578 from ljain112/fix-dimensions

fix: dimensions in common party journal entry
This commit is contained in:
ruthra kumar
2024-08-07 16:02:46 +05:30
committed by GitHub
2 changed files with 87 additions and 0 deletions

View File

@@ -2461,6 +2461,15 @@ class AccountsController(TransactionBase):
advance_entry.cost_center = self.cost_center or erpnext.get_default_cost_center(self.company)
advance_entry.is_advance = "Yes"
# update dimesions
dimensions_dict = frappe._dict()
active_dimensions = get_dimensions()[0]
for dim in active_dimensions:
dimensions_dict[dim.fieldname] = self.get(dim.fieldname)
reconcilation_entry.update(dimensions_dict)
advance_entry.update(dimensions_dict)
if self.doctype == "Sales Invoice":
reconcilation_entry.credit_in_account_currency = self.outstanding_amount
advance_entry.debit_in_account_currency = self.outstanding_amount