From d21f69cb9b993728af8ae6da2dd35df646afdf55 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Wed, 11 Sep 2024 11:42:15 +0200 Subject: [PATCH] get_maximal_parkingprice(): Fetch maxPrice directly instead of using utility function. --- library/src/calculate_price.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/src/calculate_price.cpp b/library/src/calculate_price.cpp index a763cff..cb1da5b 100644 --- a/library/src/calculate_price.cpp +++ b/library/src/calculate_price.cpp @@ -337,7 +337,9 @@ int CALCULATE_LIBRARY_API get_maximal_parkingprice(Configuration *cfg, switch(permitType) { case PERMIT_TYPE::SHORT_TERM_PARKING: { // e.g. szeged (customer_281) if (paymentMethodId == PaymentMethod::Progressive || paymentMethodId == PaymentMethod::Steps) { - maxPrice = Utilities::getMaximalParkingPrice(cfg, paymentMethodId); + //maxPrice = Utilities::getMaximalParkingPrice(cfg, paymentMethodId); + ATBPaymentOption const &po = cfg->getPaymentOptions(paymentOptionIndex); + maxPrice = po.pop_max_price; // maxTime is given in minutes } else { // PaymentMethod::Linear -> e.g. szeged int const key = cfg->getPaymentOptions(paymentOptionIndex).pop_id; int const maxTime = cfg->getPaymentOptions(paymentOptionIndex).pop_max_time; // maxTime is given in minutes