From 627d14204d48907495060c11a242464d1361ab03 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Thu, 7 Mar 2024 08:17:32 +0100 Subject: [PATCH] Use paymentRate.last() instead of aymentRate.at(0) so we can enter new entries in tariff-files to provide the prices for an hour. --- library/src/calculate_price.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/calculate_price.cpp b/library/src/calculate_price.cpp index 90f67d7..2df4053 100644 --- a/library/src/calculate_price.cpp +++ b/library/src/calculate_price.cpp @@ -134,7 +134,7 @@ int CALCULATE_LIBRARY_API get_maximal_parkingprice(Configuration *cfg, PERMIT_TY if (pv) { QVector const &paymentRate = pv.value(); if (paymentRate.size() > 0) { - int const price = paymentRate.at(0).pra_price; // price is given per hour + int const price = paymentRate.last().pra_price; // price is given per hour maxPrice = qRound((maxTime * price) / 60.0f); } }