compute_price_for_parking_ticket():

Minor: added debug output.
This commit is contained in:
Gerhard Hoffmann 2024-08-14 12:05:29 +02:00
parent 9baaca1c80
commit 1c6c9f934d

View File

@ -726,13 +726,14 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
QList<int> tlist = Calculator::GetInstance().GetTimeSteps(tariff, paymentOptionIndex, start_parking_time);
//Q_UNUSED(tlist);
qCritical() << __func__ << __LINE__ << tlist;
double minMin = tariff->getPaymentOptions(paymentOptionIndex).pop_min_time;
double maxMin = tariff->getPaymentOptions(paymentOptionIndex).pop_max_time;
// netto_parking_time = minMin;
if (DBG_LEVEL >= DBG_DEBUG) {
//if (DBG_LEVEL >= DBG_DEBUG) {
qCritical() << "compute_price_for_parking_ticket() " << endl
<< " paymentOptionIndex: " << paymentOptionIndex << endl
<< " start_parking_time: " << start_parking_time << endl
@ -743,7 +744,7 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
<< " maxMin: " << maxMin << endl
<< " prepaid: " << prepaid << endl
<< " permitType: " << permitType.toString();
}
//}
if (netto_parking_time < 0) {
calcState.setDesc(QString("end=%1, start=%2")
@ -847,8 +848,8 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
}
// DEBUG
//qCritical() << __LINE__ << " end_parking_time: " << end_parking_time;
//qCritical() << __LINE__ << " -> calculated cost (netto): " << cost;
// qCritical() << __LINE__ << " end_parking_time: " << end_parking_time;
qCritical() << __LINE__ << " -> calculated cost (netto): " << cost;
price->brutto = price->vat = price->vat_percentage = 0;
price->units = cost;
@ -862,7 +863,8 @@ 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);
}