Add explaining comments
This commit is contained in:
parent
29986e0451
commit
acf799da7e
@ -191,9 +191,9 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
|
|||||||
if (start_parking_time.isValid()) {
|
if (start_parking_time.isValid()) {
|
||||||
QString cs = start_parking_time.toString(Qt::ISODate);
|
QString cs = start_parking_time.toString(Qt::ISODate);
|
||||||
double cost = calculator.GetCostFromDuration(
|
double cost = calculator.GetCostFromDuration(
|
||||||
tariff, PaymentOption::Option1,
|
tariff, PaymentOption::Option1,
|
||||||
cs.toLocal8Bit().constData(),
|
cs.toLocal8Bit().constData(), // starting time
|
||||||
duration, false, true);
|
duration, false, true); // duration, minutes, netto
|
||||||
double minCost = tariff->PaymentOption.find(PaymentOption::Option1)->second.pop_min_price;
|
double minCost = tariff->PaymentOption.find(PaymentOption::Option1)->second.pop_min_price;
|
||||||
if (cost < minCost) {
|
if (cost < minCost) {
|
||||||
calcState.setDesc(QString("minCost=%1, cost=%2").arg(minCost, cost));
|
calcState.setDesc(QString("minCost=%1, cost=%2").arg(minCost, cost));
|
||||||
|
Loading…
Reference in New Issue
Block a user