From e6b5bc0f4d6503c732dbe78223e9b1bdfe0f6bfa Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Mon, 12 Aug 2024 09:19:20 +0200 Subject: [PATCH] compute_price_for_parking_ticket(): Use (netto_parking_time >= minutesUntilCarryOver) instead of (netto_parking_time > minutesUntilCarryOver), to correctly use interval limit. --- 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 dbe0dd0..eec2293 100644 --- a/library/src/calculate_price.cpp +++ b/library/src/calculate_price.cpp @@ -818,7 +818,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 (netto_parking_time >= minutesUntilCarryOver) { int const rest = netto_parking_time - minutesUntilCarryOver; QDateTime s(effectiveStartTime); s = s.addSecs(minutesUntilCarryOver * 60);