diff --git a/library/src/calculate_price.cpp b/library/src/calculate_price.cpp index 45545ef..acf8980 100644 --- a/library/src/calculate_price.cpp +++ b/library/src/calculate_price.cpp @@ -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 {