Minor: add some debug output.
This commit is contained in:
parent
4271c0fb31
commit
1152c3824e
@ -771,17 +771,19 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
|
|||||||
QList<int> tlist = Calculator::GetInstance().GetTimeSteps(tariff);
|
QList<int> tlist = Calculator::GetInstance().GetTimeSteps(tariff);
|
||||||
Q_UNUSED(tlist);
|
Q_UNUSED(tlist);
|
||||||
|
|
||||||
|
// compute cost (price)
|
||||||
cost = Calculator::GetInstance().GetCostFromDuration(tariff, start_parking_time, netto_parking_time, paymentOptionIndex);
|
cost = Calculator::GetInstance().GetCostFromDuration(tariff, start_parking_time, netto_parking_time, paymentOptionIndex);
|
||||||
|
|
||||||
int weekDay = start_parking_time.date().dayOfWeek();
|
int weekDay = start_parking_time.date().dayOfWeek();
|
||||||
int pop_carry_over_option_id = tariff->getPaymentOptions(paymentOptionIndex).pop_carry_over_option_id;
|
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);
|
std::optional<ATBPeriodYear> yperiod = Utilities::GetYearPeriodActive(tariff, start_parking_time);
|
||||||
if (yperiod.has_value()) {
|
if (yperiod.has_value()) {
|
||||||
ATBPeriodYear const &period = yperiod.value();
|
ATBPeriodYear const &period = yperiod.value();
|
||||||
pop_carry_over_option_id = period.pye_id;
|
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;
|
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;
|
int const carryOverDuration = tariff->TariffCarryOverOptions.find(pop_carry_over_option_id)->second.carryover[weekDay].duration;
|
||||||
|
Loading…
Reference in New Issue
Block a user