From 99dbd7c194e02e4ab0943432fdd9237c7b8df7e7 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Tue, 1 Apr 2025 14:24:42 +0200 Subject: [PATCH] Minor: debug output. --- library/src/calculate_price.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/library/src/calculate_price.cpp b/library/src/calculate_price.cpp index 85cdd74..45545ef 100644 --- a/library/src/calculate_price.cpp +++ b/library/src/calculate_price.cpp @@ -780,7 +780,7 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket( double maxMin = tariff->getPaymentOptions(paymentOptionIndex).pop_max_time; // DEBUG - qCritical() << "compute_price_for_parking_ticket() " << endl + qCritical() << __func__ << ":" << __LINE__ << endl << " paymentOptionIndex: " << paymentOptionIndex << endl << " start_parking_time: " << start_parking_time << endl << " netto_parking_time: " << netto_parking_time << endl @@ -912,10 +912,12 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket( if (carryOver == 1) { QTime carryOverStart = tariff->TariffCarryOverOptions.find(pop_carry_over_option_id)->second.carryover[weekDay].static_start; + QTime carryOverEnd = tariff->TariffCarryOverOptions.find(pop_carry_over_option_id)->second.carryover[weekDay].static_end; int carryOverDuration = tariff->TariffCarryOverOptions.find(pop_carry_over_option_id)->second.carryover[weekDay].duration; - qCritical() << __func__ << ":" << __LINE__ << " carryOverStart" << carryOverStart.toString(Qt::ISODate); - qCritical() << __func__ << ":" << __LINE__ << "carryOverDuration" << carryOverDuration; + qCritical() << __func__ << ":" << __LINE__ << " carryOverStart:" << carryOverStart.toString(Qt::ISODate); + qCritical() << __func__ << ":" << __LINE__ << " carryOverEnd:" << carryOverEnd.toString(Qt::ISODate); + qCritical() << __func__ << ":" << __LINE__ << "carryOverDuration:" << carryOverDuration; // handle carry over int minutesUntilCarryOver = effectiveStartTime.time().secsTo(carryOverStart) / 60; @@ -941,8 +943,8 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket( end_parking_time = end_parking_time.addSecs(carryOverDuration * 60); } else if (end_parking_time.time() == carryOverStart) { - qCritical() << __func__ << ":" << __LINE__ << "end-parking-time:" << end_parking_time.toString(Qt::ISODate); - qCritical() << __func__ << ":" << __LINE__ << " carryOverStart" << carryOverStart.toString(Qt::ISODate); + qCritical() << __func__ << ":" << __LINE__ << " end-parking-time:" << end_parking_time.toString(Qt::ISODate); + qCritical() << __func__ << ":" << __LINE__ << " carryOverStart:" << carryOverStart.toString(Qt::ISODate); ATBPaymentOption const &po = tariff->getPaymentOptions(paymentOptionIndex); if (po.pop_apply_carry_over_to_ticket_endtime) { end_parking_time = end_parking_time.addSecs(carryOverDuration * 60);