fix: fiscal year using future date

(cherry picked from commit 728cc9f725)
This commit is contained in:
Gursheen Anand
2023-11-22 19:28:57 +05:30
committed by Mergify
parent 7dce68bdcc
commit b0aa4efd3d

View File

@@ -382,7 +382,7 @@ class EmailDigest(Document):
"""Get income to date"""
balance = 0.0
count = 0
fy_start_date = get_fiscal_year().get("year_start_date")
fy_start_date = get_fiscal_year(self.future_to_date)[1]
for account in self.get_root_type_accounts(root_type):
balance += get_balance_on(account, date=self.future_to_date, start_date=fy_start_date)