Add explaining comments

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

View File

@ -192,8 +192,8 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
QString cs = start_parking_time.toString(Qt::ISODate);
double cost = calculator.GetCostFromDuration(
tariff, PaymentOption::Option1,
cs.toLocal8Bit().constData(),
duration, false, true);
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));