In case end-parking-time ends with 00:00, set it to 23:59.
This commit is contained in:
parent
3dda2d8355
commit
b394ed46cc
@ -849,6 +849,12 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
|
||||
return calcState.set(CalcState::State::INVALID_START_DATE);
|
||||
}
|
||||
|
||||
if (end_parking_time.time().hour() == 0 && end_parking_time.time().minute() == 0) {
|
||||
end_parking_time = end_parking_time.addDays(-1);
|
||||
end_parking_time.setTime(QTime(23, 59, 0));
|
||||
}
|
||||
qCritical() << __func__ << __LINE__ << "end_parking_time" << end_parking_time.toString(Qt::ISODate);
|
||||
|
||||
return calcState.set(CalcState::State::SUCCESS);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user