Use paymentRate.last() instead of aymentRate.at(0) so we can enter new entries

in tariff-files to provide the prices for an hour.
This commit is contained in:
Gerhard Hoffmann 2024-03-07 08:17:32 +01:00
parent 4f45db4fde
commit 627d14204d

View File

@ -134,7 +134,7 @@ int CALCULATE_LIBRARY_API get_maximal_parkingprice(Configuration *cfg, PERMIT_TY
if (pv) {
QVector<ATBPaymentRate> 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);
}
}