Minor: debug output.

This commit is contained in:
Gerhard Hoffmann 2024-09-02 17:13:11 +02:00
parent 8cdeef26fc
commit f92906f680

View File

@ -1069,6 +1069,9 @@ CalcState CALCULATE_LIBRARY_API compute_duration_for_parking_ticket(
} else {
ticketEndTime = QDateTime::fromString(endTime,Qt::ISODate);
qCritical() << __func__ << ":" << __LINE__ << "ticketEndTime:" << ticketEndTime.toString(Qt::ISODate);
qCritical() << __func__ << ":" << __LINE__ << "step-config:" << pop_time_step_config;
if (!ticketEndTime.isValid()) {
calcState.setDesc(QString("ticketEndTime=%1").arg(endTime));
return calcState.set(CalcState::State::WRONG_ISO_TIME_FORMAT);
@ -1080,13 +1083,13 @@ CalcState CALCULATE_LIBRARY_API compute_duration_for_parking_ticket(
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;
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__ << "re-computed carry-over-id" << pop_carry_over_option_id;
}
QTime carryOverStart;
@ -1149,8 +1152,8 @@ CalcState CALCULATE_LIBRARY_API compute_duration_for_parking_ticket(
}
// DEBUG
qCritical() << __func__ << __LINE__ << " endTime:" << endTime;
qCritical() << __func__ << __LINE__ << "ticketEndTime:" << ticketEndTime;
qCritical() << __func__ << ":" << __LINE__ << " endTime:" << endTime;
qCritical() << __func__ << ":" << __LINE__ << "ticketEndTime:" << ticketEndTime.toString(Qt::ISODate);
}
} else {
return calcState.set(CalcState::State::INVALID_START_DATE);
@ -1162,7 +1165,7 @@ CalcState CALCULATE_LIBRARY_API compute_duration_for_parking_ticket(
CalcState CALCULATE_LIBRARY_API compute_duration_for_daily_ticket(parking_tariff_t *tariff,
QDateTime const &start_parking_time,
QDateTime &ticketEndTime,
PermitType PermitType)
PermitType /* PermitType */)
{
CalcState calcState;
if (start_parking_time.isValid()) {