From cd159f2bbdae3a6a01545d68959010e15daee746 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Tue, 16 Apr 2024 12:05:55 +0200 Subject: [PATCH] Add case for BusinessHours::NoRestriction_24_7: used for Neuhauder-Christoph-Reisen --- library/src/calculator_functions.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/src/calculator_functions.cpp b/library/src/calculator_functions.cpp index 767bf54..edf4f71 100644 --- a/library/src/calculator_functions.cpp +++ b/library/src/calculator_functions.cpp @@ -619,6 +619,10 @@ CalcState Calculator::isParkingAllowed(Configuration const *cfg, QDateTime const if (paymentMethodId == PaymentMethod::Steps) { int const weekdayId = start.date().dayOfWeek(); BusinessHours businessHours = Utilities::getBusinessHours(cfg, paymentMethodId); + if (businessHours == BusinessHours::NoRestriction_24_7) { + return CalcState(CalcState::State::SUCCESS, "PARKING_ALLOWED", + QTime(0, 0, 0), QTime(23, 59, 59)); + } else if (businessHours == BusinessHours::OnlyWeekDays) { if (weekdayId != (int)Qt::Saturday && weekdayId != (int)Qt::Sunday) { // e.g. Neuhauser, Linsinger Maschinenbau (741) if (cfg->WeekDaysWorktime.count(weekdayId) > 0) {