From 1152c3824e09d3ae45224f7aa9bdff24e756743b Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Fri, 2 Aug 2024 11:08:32 +0200 Subject: [PATCH] Minor: add some debug output. --- library/src/calculate_price.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/src/calculate_price.cpp b/library/src/calculate_price.cpp index 2165055..1ded7ed 100644 --- a/library/src/calculate_price.cpp +++ b/library/src/calculate_price.cpp @@ -771,17 +771,19 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket( QList tlist = Calculator::GetInstance().GetTimeSteps(tariff); Q_UNUSED(tlist); + // compute cost (price) cost = Calculator::GetInstance().GetCostFromDuration(tariff, start_parking_time, netto_parking_time, paymentOptionIndex); int weekDay = start_parking_time.date().dayOfWeek(); int pop_carry_over_option_id = tariff->getPaymentOptions(paymentOptionIndex).pop_carry_over_option_id; + qCritical() << __func__ << __LINE__ << "configured carry-over-id" << pop_carry_over_option_id; std::optional yperiod = Utilities::GetYearPeriodActive(tariff, start_parking_time); if (yperiod.has_value()) { ATBPeriodYear const &period = yperiod.value(); pop_carry_over_option_id = period.pye_id; + qCritical() << __func__ << __LINE__ << "re-computed carry-over-id" << pop_carry_over_option_id; } - qCritical() << __func__ << __LINE__ << "carryOver-id" << pop_carry_over_option_id; QTime const carryOverStart = tariff->TariffCarryOverOptions.find(pop_carry_over_option_id)->second.carryover[weekDay].static_start; int const carryOverDuration = tariff->TariffCarryOverOptions.find(pop_carry_over_option_id)->second.carryover[weekDay].duration;