refactor: Credit Note and its Exc gain/loss JE inherits dimensions
This commit is contained in:
@@ -2046,8 +2046,6 @@ def create_gain_loss_journal(
|
||||
cost_center,
|
||||
dimensions,
|
||||
) -> str:
|
||||
# TODO: pass dimensions to Journal
|
||||
|
||||
journal_entry = frappe.new_doc("Journal Entry")
|
||||
journal_entry.voucher_type = "Exchange Gain Or Loss"
|
||||
journal_entry.company = company
|
||||
@@ -2080,7 +2078,7 @@ def create_gain_loss_journal(
|
||||
dr_or_cr + "_in_account_currency": 0,
|
||||
}
|
||||
)
|
||||
|
||||
journal_account.update(dimensions)
|
||||
journal_entry.append("accounts", journal_account)
|
||||
|
||||
journal_account = frappe._dict(
|
||||
@@ -2096,7 +2094,7 @@ def create_gain_loss_journal(
|
||||
reverse_dr_or_cr: abs(exc_gain_loss),
|
||||
}
|
||||
)
|
||||
|
||||
journal_account.update(dimensions)
|
||||
journal_entry.append("accounts", journal_account)
|
||||
|
||||
journal_entry.save()
|
||||
|
||||
Reference in New Issue
Block a user