Minor: debug output (de-)activated.

This commit is contained in:
Gerhard Hoffmann 2024-08-13 14:53:44 +02:00
parent 8d9119ac83
commit 21534ba153

View File

@ -732,16 +732,18 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
// netto_parking_time = minMin;
// DEBUG
qCritical() << "compute_price_for_parking_ticket() " << endl
<< " paymentOptionIndex: " << paymentOptionIndex << endl
<< " start_parking_time: " << start_parking_time << endl
<< " netto_parking_time: " << netto_parking_time << endl
<< " start + netto: " << start_parking_time.addSecs(netto_parking_time * 60) << endl
<< " minMin: " << minMin << endl
<< " maxMin: " << maxMin << endl
<< " prepaid: " << prepaid << endl
<< " permitType: " << permitType.toString();
if (DBG_LEVEL >= DBG_DEBUG) {
qCritical() << "compute_price_for_parking_ticket() " << endl
<< " paymentOptionIndex: " << paymentOptionIndex << endl
<< " start_parking_time: " << start_parking_time << endl
<< " start_parking_time_: " << start_parking_time_ << endl
<< " netto_parking_time: " << netto_parking_time << endl
<< " start + netto: " << start_parking_time.addSecs(netto_parking_time * 60) << endl
<< " minMin: " << minMin << endl
<< " maxMin: " << maxMin << endl
<< " prepaid: " << prepaid << endl
<< " permitType: " << permitType.toString();
}
if (netto_parking_time < 0) {
calcState.setDesc(QString("end=%1, start=%2")
@ -788,14 +790,14 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
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 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;
qCritical() << __func__ << __LINE__ << "carryOverStart" << carryOverStart.toString(Qt::ISODate);
qCritical() << __func__ << __LINE__ << "carryOverDuration" << carryOverDuration;
//qCritical() << __func__ << __LINE__ << "carryOverStart" << carryOverStart.toString(Qt::ISODate);
//qCritical() << __func__ << __LINE__ << "carryOverDuration" << carryOverDuration;
// handle prepaid option
QDateTime effectiveStartTime(start_parking_time);
@ -860,7 +862,7 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
end_parking_time = end_parking_time.addDays(-1);
end_parking_time.setTime(QTime(23, 59, 0));
}
qCritical() << __func__ << __LINE__ << "end_parking_time" << end_parking_time.toString(Qt::ISODate);
//qCritical() << __func__ << __LINE__ << "end_parking_time" << end_parking_time.toString(Qt::ISODate);
return calcState.set(CalcState::State::SUCCESS);
}