Minor: debug output.
This commit is contained in:
parent
8cdeef26fc
commit
f92906f680
@ -1069,6 +1069,9 @@ CalcState CALCULATE_LIBRARY_API compute_duration_for_parking_ticket(
|
|||||||
} else {
|
} else {
|
||||||
ticketEndTime = QDateTime::fromString(endTime,Qt::ISODate);
|
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()) {
|
if (!ticketEndTime.isValid()) {
|
||||||
calcState.setDesc(QString("ticketEndTime=%1").arg(endTime));
|
calcState.setDesc(QString("ticketEndTime=%1").arg(endTime));
|
||||||
return calcState.set(CalcState::State::WRONG_ISO_TIME_FORMAT);
|
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 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;
|
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__ << "re-computed carry-over-id" << pop_carry_over_option_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
QTime carryOverStart;
|
QTime carryOverStart;
|
||||||
@ -1149,8 +1152,8 @@ CalcState CALCULATE_LIBRARY_API compute_duration_for_parking_ticket(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// DEBUG
|
// DEBUG
|
||||||
qCritical() << __func__ << __LINE__ << " endTime:" << endTime;
|
qCritical() << __func__ << ":" << __LINE__ << " endTime:" << endTime;
|
||||||
qCritical() << __func__ << __LINE__ << "ticketEndTime:" << ticketEndTime;
|
qCritical() << __func__ << ":" << __LINE__ << "ticketEndTime:" << ticketEndTime.toString(Qt::ISODate);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return calcState.set(CalcState::State::INVALID_START_DATE);
|
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,
|
CalcState CALCULATE_LIBRARY_API compute_duration_for_daily_ticket(parking_tariff_t *tariff,
|
||||||
QDateTime const &start_parking_time,
|
QDateTime const &start_parking_time,
|
||||||
QDateTime &ticketEndTime,
|
QDateTime &ticketEndTime,
|
||||||
PermitType PermitType)
|
PermitType /* PermitType */)
|
||||||
{
|
{
|
||||||
CalcState calcState;
|
CalcState calcState;
|
||||||
if (start_parking_time.isValid()) {
|
if (start_parking_time.isValid()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user