mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-20 07:22:13 +00:00
fix: update dimesions in exchange_gain_loss jv based on base document
(cherry picked from commit 96df19149d)
This commit is contained in:
@@ -1334,6 +1334,12 @@ class AccountsController(TransactionBase):
|
|||||||
# Cancelling existing exchange gain/loss journals is handled during the `on_cancel` event.
|
# Cancelling existing exchange gain/loss journals is handled during the `on_cancel` event.
|
||||||
# see accounts/utils.py:cancel_exchange_gain_loss_journal()
|
# see accounts/utils.py:cancel_exchange_gain_loss_journal()
|
||||||
if self.docstatus == 1:
|
if self.docstatus == 1:
|
||||||
|
if dimensions_dict is None:
|
||||||
|
dimensions_dict = frappe._dict()
|
||||||
|
active_dimensions = get_dimensions()[0]
|
||||||
|
for dim in active_dimensions:
|
||||||
|
dimensions_dict[dim.fieldname] = self.get(dim.fieldname)
|
||||||
|
|
||||||
if self.get("doctype") == "Journal Entry":
|
if self.get("doctype") == "Journal Entry":
|
||||||
# 'args' is populated with exchange gain/loss account and the amount to be booked.
|
# 'args' is populated with exchange gain/loss account and the amount to be booked.
|
||||||
# These are generated by Sales/Purchase Invoice during reconciliation and advance allocation.
|
# These are generated by Sales/Purchase Invoice during reconciliation and advance allocation.
|
||||||
|
|||||||
Reference in New Issue
Block a user