[fix] Journal Entry: init debit/credit in account currency
This commit is contained in:
parent
e1a1c8ac31
commit
c07489a096
@ -298,8 +298,11 @@ class JournalEntry(AccountsController):
|
||||
|
||||
def set_amounts_in_company_currency(self):
|
||||
for d in self.get("accounts"):
|
||||
d.debit = flt(flt(d.debit_in_account_currency)*flt(d.exchange_rate), d.precision("debit"))
|
||||
d.credit = flt(flt(d.credit_in_account_currency)*flt(d.exchange_rate), d.precision("credit"))
|
||||
d.debit_in_account_currency = flt(d.debit_in_account_currency, d.precision("debit_in_account_currency"))
|
||||
d.credit_in_account_currency = flt(d.credit_in_account_currency, d.precision("credit_in_account_currency"))
|
||||
|
||||
d.debit = flt(d.debit_in_account_currency * flt(d.exchange_rate), d.precision("debit"))
|
||||
d.credit = flt(d.credit_in_account_currency * flt(d.exchange_rate), d.precision("credit"))
|
||||
|
||||
def set_exchange_rate(self):
|
||||
for d in self.get("accounts"):
|
||||
|
Loading…
Reference in New Issue
Block a user