if end of parking time equals carry-over-end, then, if configured, go back to carry-over-start.

This commit is contained in:
Gerhard Hoffmann 2025-04-01 14:26:21 +02:00
parent 99dbd7c194
commit d82a732a8d

View File

@ -948,7 +948,16 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
ATBPaymentOption const &po = tariff->getPaymentOptions(paymentOptionIndex);
if (po.pop_apply_carry_over_to_ticket_endtime) {
end_parking_time = end_parking_time.addSecs(carryOverDuration * 60);
qCritical() << __func__ << ":" << __LINE__ << "end-parking-time:" << end_parking_time.toString(Qt::ISODate);
qCritical() << __func__ << ":" << __LINE__ << "adapted end-parking-time:" << end_parking_time.toString(Qt::ISODate);
}
} else
if (end_parking_time.time() == carryOverEnd) {
qCritical() << __func__ << ":" << __LINE__ << " end-parking-time:" << end_parking_time.toString(Qt::ISODate);
qCritical() << __func__ << ":" << __LINE__ << " carryOverEnd:" << carryOverEnd.toString(Qt::ISODate);
ATBPaymentOption const &po = tariff->getPaymentOptions(paymentOptionIndex);
if (po.pop_apply_carry_over_to_ticket_endtime == false) {
end_parking_time = end_parking_time.addSecs(-carryOverDuration * 60);
qCritical() << __func__ << ":" << __LINE__ << "adapted end-parking-time:" << end_parking_time.toString(Qt::ISODate);
}
}
} else {