compute_price_for_parking_ticket():
Minor: added debug output.
This commit is contained in:
parent
9baaca1c80
commit
1c6c9f934d
@ -726,13 +726,14 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
|
|||||||
|
|
||||||
QList<int> tlist = Calculator::GetInstance().GetTimeSteps(tariff, paymentOptionIndex, start_parking_time);
|
QList<int> tlist = Calculator::GetInstance().GetTimeSteps(tariff, paymentOptionIndex, start_parking_time);
|
||||||
//Q_UNUSED(tlist);
|
//Q_UNUSED(tlist);
|
||||||
|
qCritical() << __func__ << __LINE__ << tlist;
|
||||||
|
|
||||||
double minMin = tariff->getPaymentOptions(paymentOptionIndex).pop_min_time;
|
double minMin = tariff->getPaymentOptions(paymentOptionIndex).pop_min_time;
|
||||||
double maxMin = tariff->getPaymentOptions(paymentOptionIndex).pop_max_time;
|
double maxMin = tariff->getPaymentOptions(paymentOptionIndex).pop_max_time;
|
||||||
|
|
||||||
// netto_parking_time = minMin;
|
// netto_parking_time = minMin;
|
||||||
|
|
||||||
if (DBG_LEVEL >= DBG_DEBUG) {
|
//if (DBG_LEVEL >= DBG_DEBUG) {
|
||||||
qCritical() << "compute_price_for_parking_ticket() " << endl
|
qCritical() << "compute_price_for_parking_ticket() " << endl
|
||||||
<< " paymentOptionIndex: " << paymentOptionIndex << endl
|
<< " paymentOptionIndex: " << paymentOptionIndex << endl
|
||||||
<< " start_parking_time: " << start_parking_time << endl
|
<< " start_parking_time: " << start_parking_time << endl
|
||||||
@ -743,7 +744,7 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
|
|||||||
<< " maxMin: " << maxMin << endl
|
<< " maxMin: " << maxMin << endl
|
||||||
<< " prepaid: " << prepaid << endl
|
<< " prepaid: " << prepaid << endl
|
||||||
<< " permitType: " << permitType.toString();
|
<< " permitType: " << permitType.toString();
|
||||||
}
|
//}
|
||||||
|
|
||||||
if (netto_parking_time < 0) {
|
if (netto_parking_time < 0) {
|
||||||
calcState.setDesc(QString("end=%1, start=%2")
|
calcState.setDesc(QString("end=%1, start=%2")
|
||||||
@ -848,7 +849,7 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
|
|||||||
|
|
||||||
// DEBUG
|
// DEBUG
|
||||||
// qCritical() << __LINE__ << " end_parking_time: " << end_parking_time;
|
// qCritical() << __LINE__ << " end_parking_time: " << end_parking_time;
|
||||||
//qCritical() << __LINE__ << " -> calculated cost (netto): " << cost;
|
qCritical() << __LINE__ << " -> calculated cost (netto): " << cost;
|
||||||
|
|
||||||
price->brutto = price->vat = price->vat_percentage = 0;
|
price->brutto = price->vat = price->vat_percentage = 0;
|
||||||
price->units = cost;
|
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 = end_parking_time.addDays(-1);
|
||||||
end_parking_time.setTime(QTime(23, 59, 0));
|
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);
|
return calcState.set(CalcState::State::SUCCESS);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user