Minor: add some debug output.

This commit is contained in:
Gerhard Hoffmann 2024-08-02 11:08:32 +02:00
parent 4271c0fb31
commit 1152c3824e

View File

@ -771,17 +771,19 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
QList<int> 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<ATBPeriodYear> 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;