From 1d8dfcfa222fe2d6c1c23934c53d7b3e0220a772 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Thu, 12 Sep 2024 11:11:25 +0200 Subject: [PATCH] get_minimal_parkingtime(): Call Calculator::GetInstance().GetTimeSteps() to initialize time-step-list. This internally recomputes the minimal parking time (until midnight) which cannot be configured (as static value) in tariff-file. --- library/src/calculate_price.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/src/calculate_price.cpp b/library/src/calculate_price.cpp index 347d6ce..1a2631f 100644 --- a/library/src/calculate_price.cpp +++ b/library/src/calculate_price.cpp @@ -36,6 +36,8 @@ int CALCULATE_LIBRARY_API get_minimal_parkingtime(Configuration const *cfg, switch(permitType) { case PERMIT_TYPE::SHORT_TERM_PARKING: { // e.g. szeged (customer_281) + QList const tsteps = Calculator::GetInstance().GetTimeSteps((Configuration *)cfg, paymentOptionIndex); + Q_UNUSED(tsteps); minTime = cfg->getPaymentOptions(paymentOptionIndex).pop_min_time; } break; case PERMIT_TYPE::DAY_TICKET_ADULT: {