Merge pull request #9369 from sagarvora/gh-4559
[minor] calculate balance in company currency instead of account currency
This commit is contained in:
commit
958b06b129
@ -364,9 +364,9 @@ class EmailDigest(Document):
|
|||||||
balance = prev_balance = 0.0
|
balance = prev_balance = 0.0
|
||||||
count = 0
|
count = 0
|
||||||
for account in accounts:
|
for account in accounts:
|
||||||
balance += get_balance_on(account, date=self.future_to_date)
|
balance += get_balance_on(account, date=self.future_to_date, in_account_currency=False)
|
||||||
count += get_count_on(account, fieldname, date=self.future_to_date)
|
count += get_count_on(account, fieldname, date=self.future_to_date)
|
||||||
prev_balance += get_balance_on(account, date=self.past_to_date)
|
prev_balance += get_balance_on(account, date=self.past_to_date, in_account_currency=False)
|
||||||
|
|
||||||
if fieldname in ("bank_balance","credit_balance"):
|
if fieldname in ("bank_balance","credit_balance"):
|
||||||
return {
|
return {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user