Add explaining comments

This commit is contained in:
Siegfried Siegert 2023-05-15 16:58:28 +02:00
parent 29986e0451
commit acf799da7e
Signed by: SiegfriedSiegert
GPG Key ID: 68371E015E8F0B03

View File

@ -191,9 +191,9 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
if (start_parking_time.isValid()) {
QString cs = start_parking_time.toString(Qt::ISODate);
double cost = calculator.GetCostFromDuration(
tariff, PaymentOption::Option1,
cs.toLocal8Bit().constData(),
duration, false, true);
tariff, PaymentOption::Option1,
cs.toLocal8Bit().constData(), // starting time
duration, false, true); // duration, minutes, netto
double minCost = tariff->PaymentOption.find(PaymentOption::Option1)->second.pop_min_price;
if (cost < minCost) {
calcState.setDesc(QString("minCost=%1, cost=%2").arg(minCost, cost));