Minor: debug output.

This commit is contained in:
Gerhard Hoffmann 2025-04-01 14:24:42 +02:00
parent 6a215d4cf9
commit 99dbd7c194

View File

@ -780,7 +780,7 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
double maxMin = tariff->getPaymentOptions(paymentOptionIndex).pop_max_time; double maxMin = tariff->getPaymentOptions(paymentOptionIndex).pop_max_time;
// DEBUG // DEBUG
qCritical() << "compute_price_for_parking_ticket() " << endl qCritical() << __func__ << ":" << __LINE__ << endl
<< " paymentOptionIndex: " << paymentOptionIndex << 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 << " netto_parking_time: " << netto_parking_time << endl
@ -912,10 +912,12 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
if (carryOver == 1) { if (carryOver == 1) {
QTime carryOverStart = tariff->TariffCarryOverOptions.find(pop_carry_over_option_id)->second.carryover[weekDay].static_start; QTime carryOverStart = tariff->TariffCarryOverOptions.find(pop_carry_over_option_id)->second.carryover[weekDay].static_start;
QTime carryOverEnd = tariff->TariffCarryOverOptions.find(pop_carry_over_option_id)->second.carryover[weekDay].static_end;
int carryOverDuration = tariff->TariffCarryOverOptions.find(pop_carry_over_option_id)->second.carryover[weekDay].duration; int carryOverDuration = tariff->TariffCarryOverOptions.find(pop_carry_over_option_id)->second.carryover[weekDay].duration;
qCritical() << __func__ << ":" << __LINE__ << " carryOverStart" << carryOverStart.toString(Qt::ISODate); qCritical() << __func__ << ":" << __LINE__ << " carryOverStart:" << carryOverStart.toString(Qt::ISODate);
qCritical() << __func__ << ":" << __LINE__ << "carryOverDuration" << carryOverDuration; qCritical() << __func__ << ":" << __LINE__ << " carryOverEnd:" << carryOverEnd.toString(Qt::ISODate);
qCritical() << __func__ << ":" << __LINE__ << "carryOverDuration:" << carryOverDuration;
// handle carry over // handle carry over
int minutesUntilCarryOver = effectiveStartTime.time().secsTo(carryOverStart) / 60; int minutesUntilCarryOver = effectiveStartTime.time().secsTo(carryOverStart) / 60;
@ -941,8 +943,8 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
end_parking_time = end_parking_time.addSecs(carryOverDuration * 60); end_parking_time = end_parking_time.addSecs(carryOverDuration * 60);
} else } else
if (end_parking_time.time() == carryOverStart) { if (end_parking_time.time() == carryOverStart) {
qCritical() << __func__ << ":" << __LINE__ << "end-parking-time:" << end_parking_time.toString(Qt::ISODate); qCritical() << __func__ << ":" << __LINE__ << " end-parking-time:" << end_parking_time.toString(Qt::ISODate);
qCritical() << __func__ << ":" << __LINE__ << " carryOverStart" << carryOverStart.toString(Qt::ISODate); qCritical() << __func__ << ":" << __LINE__ << " carryOverStart:" << carryOverStart.toString(Qt::ISODate);
ATBPaymentOption const &po = tariff->getPaymentOptions(paymentOptionIndex); ATBPaymentOption const &po = tariff->getPaymentOptions(paymentOptionIndex);
if (po.pop_apply_carry_over_to_ticket_endtime) { if (po.pop_apply_carry_over_to_ticket_endtime) {
end_parking_time = end_parking_time.addSecs(carryOverDuration * 60); end_parking_time = end_parking_time.addSecs(carryOverDuration * 60);