mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-01 20:48:27 +00:00
fix: annual income and expenses in digest
(cherry picked from commit 52305e3000)
This commit is contained in:
@@ -382,9 +382,10 @@ class EmailDigest(Document):
|
||||
"""Get income to date"""
|
||||
balance = 0.0
|
||||
count = 0
|
||||
fy_start_date = get_fiscal_year().get("year_start_date")
|
||||
|
||||
for account in self.get_root_type_accounts(root_type):
|
||||
balance += get_balance_on(account, date=self.future_to_date)
|
||||
balance += get_balance_on(account, date=self.future_to_date, start_date=fy_start_date)
|
||||
count += get_count_on(account, fieldname, date=self.future_to_date)
|
||||
|
||||
if fieldname == "income":
|
||||
|
||||
Reference in New Issue
Block a user