compute_price_for_parking_ticket():
Check if minutesUntilCarryOver is positive (usually must be).
This commit is contained in:
parent
205896903b
commit
38abc65425
@ -893,7 +893,7 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
|
|||||||
|
|
||||||
// handle carry over
|
// handle carry over
|
||||||
int minutesUntilCarryOver = effectiveStartTime.time().secsTo(carryOverStart) / 60;
|
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;
|
int const rest = netto_parking_time - minutesUntilCarryOver;
|
||||||
QDateTime s(effectiveStartTime);
|
QDateTime s(effectiveStartTime);
|
||||||
s = s.addSecs(minutesUntilCarryOver * 60);
|
s = s.addSecs(minutesUntilCarryOver * 60);
|
||||||
|
Loading…
Reference in New Issue
Block a user