refactor: update dimensions, only if provided
This commit is contained in:
parent
f8bbb0619c
commit
ec0f17ca8b
@ -2097,6 +2097,7 @@ def create_gain_loss_journal(
|
|||||||
dr_or_cr + "_in_account_currency": 0,
|
dr_or_cr + "_in_account_currency": 0,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
if dimensions:
|
||||||
journal_account.update(dimensions)
|
journal_account.update(dimensions)
|
||||||
journal_entry.append("accounts", journal_account)
|
journal_entry.append("accounts", journal_account)
|
||||||
|
|
||||||
@ -2113,6 +2114,7 @@ def create_gain_loss_journal(
|
|||||||
reverse_dr_or_cr: abs(exc_gain_loss),
|
reverse_dr_or_cr: abs(exc_gain_loss),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
if dimensions:
|
||||||
journal_account.update(dimensions)
|
journal_account.update(dimensions)
|
||||||
journal_entry.append("accounts", journal_account)
|
journal_entry.append("accounts", journal_account)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user