compute_price_for_parking_ticket():

Check if minutesUntilCarryOver is positive (usually must be).
This commit is contained in:
Gerhard Hoffmann 2024-09-16 16:54:25 +02:00
parent 205896903b
commit 38abc65425

View File

@ -893,7 +893,7 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
// handle carry over
int minutesUntilCarryOver = effectiveStartTime.time().secsTo(carryOverStart) / 60;
if (netto_parking_time > minutesUntilCarryOver) {
if ((minutesUntilCarryOver > 0) && (netto_parking_time > minutesUntilCarryOver)) {
int const rest = netto_parking_time - minutesUntilCarryOver;
QDateTime s(effectiveStartTime);
s = s.addSecs(minutesUntilCarryOver * 60);