Merge pull request #22230 from deepeshgarg007/financial_statement_to_date_v13

fix: Data not appearing properly for some fiscal_year in financial statements
This commit is contained in:
Deepesh Garg 2020-06-13 19:27:38 +05:30 committed by GitHub
commit f3261794d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,8 +56,7 @@ def get_period_list(from_fiscal_year, to_fiscal_year, period_start_date, period_
to_date = add_months(start_date, months_to_add)
start_date = to_date
if to_date == get_first_day(to_date):
# if to_date is the first day, get the last day of previous month
# Subtract one day from to_date, as it may be first day in next fiscal year or month
to_date = add_days(to_date, -1)
if to_date <= year_end_date: