Fix: Handle case if "pop_carry_over_start_time_range" and "pop_carry_over_end_time_range"
is not given in tariff file.
This commit is contained in:
parent
8737508839
commit
64b2b4bd85
@ -689,6 +689,18 @@ CalcState Calculator::isParkingAllowedForWeekDay(Configuration const *cfg,
|
|||||||
int const pop_carry_over_start_time_range = cfg->getPaymentOptions(paymentOptionIndex).pop_carry_over_start_time_range;
|
int const pop_carry_over_start_time_range = cfg->getPaymentOptions(paymentOptionIndex).pop_carry_over_start_time_range;
|
||||||
int const pop_carry_over_end_time_range = cfg->getPaymentOptions(paymentOptionIndex).pop_carry_over_end_time_range;
|
int const pop_carry_over_end_time_range = cfg->getPaymentOptions(paymentOptionIndex).pop_carry_over_end_time_range;
|
||||||
|
|
||||||
|
// qCritical() << DBG_HEADER
|
||||||
|
// << "pop_carry_over_start_time_range" << pop_carry_over_start_time_range
|
||||||
|
// << "pop_carry_over_end_time_range" << pop_carry_over_end_time_range;
|
||||||
|
|
||||||
|
if ((int)cfg->TimeRange.count(pop_carry_over_start_time_range) <= 0 &&
|
||||||
|
(int)cfg->TimeRange.count(pop_carry_over_end_time_range) <= 0) {
|
||||||
|
|
||||||
|
qCritical() << DBG_HEADER << "PARKING_ALLOWED. startTime" << startTime.toString(Qt::ISODate);
|
||||||
|
return CalcState(CalcState::State::SUCCESS, "PARKING_ALLOWED", startTime);
|
||||||
|
|
||||||
|
} else
|
||||||
|
// search entry in time-range-field of tariff-file
|
||||||
if (cfg->TimeRange.count(pop_carry_over_start_time_range) == 1 &&
|
if (cfg->TimeRange.count(pop_carry_over_start_time_range) == 1 &&
|
||||||
cfg->TimeRange.count(pop_carry_over_end_time_range) == 1) {
|
cfg->TimeRange.count(pop_carry_over_end_time_range) == 1) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user