fix: Period list for exponential smoothing forecasting report (#24982)
This commit is contained in:
parent
12f0923a61
commit
82983369fa
@ -51,7 +51,11 @@ def get_period_list(from_fiscal_year, to_fiscal_year, period_start_date, period_
|
||||
"from_date": start_date
|
||||
})
|
||||
|
||||
to_date = add_months(start_date, months_to_add)
|
||||
if i==0 and filter_based_on == 'Date Range':
|
||||
to_date = add_months(get_first_day(start_date), months_to_add)
|
||||
else:
|
||||
to_date = add_months(start_date, months_to_add)
|
||||
|
||||
start_date = to_date
|
||||
|
||||
# Subtract one day from to_date, as it may be first day in next fiscal year or month
|
||||
|
@ -61,7 +61,7 @@ class ForecastingReport(ExponentialSmoothingForecast):
|
||||
|
||||
from_date = add_years(self.filters.from_date, cint(self.filters.no_of_years) * -1)
|
||||
self.period_list = get_period_list(from_date, self.filters.to_date,
|
||||
from_date, self.filters.to_date, None, self.filters.periodicity, ignore_fiscal_year=True)
|
||||
from_date, self.filters.to_date, "Date Range", self.filters.periodicity, ignore_fiscal_year=True)
|
||||
|
||||
order_data = self.get_data_for_forecast() or []
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user