fix: get period estimate till service end date
This commit is contained in:
@@ -122,17 +122,20 @@ class Deferred_Item:
|
|||||||
"""
|
"""
|
||||||
simulate future posting by creating dummy gl entries. starts from the last posting date.
|
simulate future posting by creating dummy gl entries. starts from the last posting date.
|
||||||
"""
|
"""
|
||||||
if self.service_start_date != self.service_end_date:
|
if (
|
||||||
if add_days(self.last_entry_date, 1) < self.period_list[-1].to_date:
|
self.service_start_date != self.service_end_date
|
||||||
|
and add_days(self.last_entry_date, 1) < self.service_end_date
|
||||||
|
):
|
||||||
self.estimate_for_period_list = get_period_list(
|
self.estimate_for_period_list = get_period_list(
|
||||||
self.filters.from_fiscal_year,
|
self.filters.from_fiscal_year,
|
||||||
self.filters.to_fiscal_year,
|
self.filters.to_fiscal_year,
|
||||||
add_days(self.last_entry_date, 1),
|
add_days(self.last_entry_date, 1),
|
||||||
self.period_list[-1].to_date,
|
self.service_end_date,
|
||||||
"Date Range",
|
"Date Range",
|
||||||
"Monthly",
|
"Monthly",
|
||||||
company=self.filters.company,
|
company=self.filters.company,
|
||||||
)
|
)
|
||||||
|
|
||||||
for period in self.estimate_for_period_list:
|
for period in self.estimate_for_period_list:
|
||||||
amount = self.calculate_amount(period.from_date, period.to_date)
|
amount = self.calculate_amount(period.from_date, period.to_date)
|
||||||
gle = self.make_dummy_gle(period.key, period.to_date, amount)
|
gle = self.make_dummy_gle(period.key, period.to_date, amount)
|
||||||
|
|||||||
Reference in New Issue
Block a user