Fix a bug in handling of recurring transactions with HWT NEXT_WORKDAY

If a recurring transaction has its firstOccurrence on a saturday it was falsely recognized as due today, if today was a sunday
This commit is contained in:
2019-05-19 11:57:57 +02:00
parent 7d1f915dd8
commit 8a62bb8bea
2 changed files with 45 additions and 3 deletions

View File

@@ -169,6 +169,12 @@ public class RecurringTransactionService {
return false; // early return
}
// If today is a weekend day or holiday the recurring transaction cannot be due today, because the
// holiday weekend type says NEXT_WORKDAY.
if (this.ruleService.isHoliday(now) || this.ruleService.isWeekend(now)) {
return false; // early return
}
boolean weekend;
boolean holiday;
LocalDate yesterday = now;