fixed validierung Buchungsperiode

This commit is contained in:
Ralph Soika 2022-01-07 09:57:31 +01:00
parent 430bfe3c39
commit a72e5727de

View file

@ -190,7 +190,7 @@ public class InvoicePlugin extends AbstractPlugin {
LocalDate localDate = LocalDate.now(); LocalDate localDate = LocalDate.now();
int year = localDate.getYear(); int year = localDate.getYear();
// build regex.... // build regex....
String regex = "(" + year + "|" + (year + 1) + ")(1[0-2]|0[1-9])"; String regex = "(" + year + "|" + (year + 1) + "|" + (year - 1) + ")(1[0-2]|0[1-9])";
if (!period.matches(regex)) { if (!period.matches(regex)) {
// throw a plugin exception - because name is missing! // throw a plugin exception - because name is missing!