From d95275a72d8c836f42c33e9d0e0389b97bb95359 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Tue, 17 Sep 2024 17:04:27 +0200 Subject: [PATCH] Compute real netto_parking_time. This time will be used to find the real time-step, and from here the actual price to pay. --- library/src/calculate_price.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/library/src/calculate_price.cpp b/library/src/calculate_price.cpp index 01275e1..f38bb21 100644 --- a/library/src/calculate_price.cpp +++ b/library/src/calculate_price.cpp @@ -1240,6 +1240,12 @@ CalcState CALCULATE_LIBRARY_API compute_duration_for_parking_ticket( } if (carryOverStart.isValid() && carryOverEnd.isValid() && carryOverDuration != -1) { + + // note: in such a case (direct coins) carry-over has been handled + // already in GetDurationFromCost() + netto_parking_time -= carryOverDuration; + qCritical() << __func__ << ":" << __LINE__ << "netto-parking-time" << netto_parking_time; + // qCritical() << __func__ << __LINE__ << "ticketEndTime.time():" << ticketEndTime.time().toString(Qt::ISODate); if (ticketEndTime.time() > carryOverStart) { // qCritical() << __func__ << __LINE__ << "ticketEndTime.time():" << ticketEndTime.time().toString(Qt::ISODate);