Compute real netto_parking_time.

This time will be used to find the real time-step, and from here the actual price to pay.
This commit is contained in:
Gerhard Hoffmann 2024-09-17 17:04:27 +02:00
parent 577a17dc6a
commit d95275a72d

View File

@ -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);