Add case for BusinessHours::NoRestriction_24_7: used for Neuhauder-Christoph-Reisen
This commit is contained in:
parent
475487c2ce
commit
cd159f2bbd
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user