Do not include start date when searching previous fiscalyear to cumulate
As there is a check to ensure that fiscalyears does not overlap it does not make sense to include fiscalyears which end on the same start date as the start of the current fiscalyear. issue5131 review41811002
This commit is contained in:
+1
-1
@@ -829,7 +829,7 @@ class Account(ModelSQL, ModelView):
|
||||
fiscalyear = None
|
||||
if youngest_fiscalyear:
|
||||
fiscalyears = FiscalYear.search([
|
||||
('end_date', '<=', youngest_fiscalyear.start_date),
|
||||
('end_date', '<', youngest_fiscalyear.start_date),
|
||||
('company', '=', youngest_fiscalyear.company),
|
||||
], order=[('end_date', 'DESC')], limit=1)
|
||||
if fiscalyears:
|
||||
|
||||
Reference in New Issue
Block a user