compute_price_for_parking_ticket():
Pass start-date-time to parking-time-checker.
This commit is contained in:
parent
6d2bde1fe9
commit
275c3ec869
@ -852,7 +852,9 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
|
||||
|
||||
for (auto[itr, rangeEnd] = tariff->WeekDays.equal_range((Qt::DayOfWeek)weekDay); itr != rangeEnd; ++itr) {
|
||||
ATBWeekDay const &wd = itr->second;
|
||||
bool const parkTimeLimitViolated = wd.getTariffCarryOverSettings().parkingTimeLimitExceeded(end_parking_time, paymentOptionIndex);
|
||||
bool const parkTimeLimitViolated = wd.getTariffCarryOverSettings().parkingTimeLimitExceeded(effectiveStartTime,
|
||||
end_parking_time,
|
||||
paymentOptionIndex);
|
||||
if (parkTimeLimitViolated) {
|
||||
calcState.setDesc(QString("line=%1 endTime=%2: park-time-limit violated").arg(__LINE__)
|
||||
.arg(end_parking_time.time().toString(Qt::ISODate)));
|
||||
@ -1138,7 +1140,9 @@ CalcState CALCULATE_LIBRARY_API compute_duration_for_parking_ticket(
|
||||
itr != rangeEnd;
|
||||
++itr) {
|
||||
ATBWeekDay const &wd = itr->second;
|
||||
bool const parkTimeLimitViolated = wd.getTariffCarryOverSettings().parkingTimeLimitExceeded(ticketEndTime, paymentOptionIndex);
|
||||
bool const parkTimeLimitViolated = wd.getTariffCarryOverSettings().parkingTimeLimitExceeded(start_parking_time,
|
||||
ticketEndTime,
|
||||
paymentOptionIndex);
|
||||
if (parkTimeLimitViolated) {
|
||||
calcState.setDesc(QString("line=%1 endTime=%2: park-time-limit violated").arg(__LINE__)
|
||||
.arg(ticketEndTime.time().toString(Qt::ISODate)));
|
||||
|
Loading…
Reference in New Issue
Block a user