GetDailyTicketPrice(): improve for projects which have not defined a daily ticket in their tariff-files.

This commit is contained in:
Gerhard Hoffmann 2024-02-22 16:37:11 +01:00
parent e980d8c451
commit 6d18ce4caa

View File

@ -1423,6 +1423,18 @@ Calculator::GetDailyTicketPrice(Configuration* cfg,
case PERMIT_TYPE::INVALID: case PERMIT_TYPE::INVALID:
break; break;
} }
} else {
// for projects which have not defined a daily ticket in their
// tariff-files (e.g. szeged)
price.netto = cfg->getPaymentOptions().pop_daily_card_price;
qCritical() << "( GetDailyTicketPrice():" << __LINE__ << ")";
qCritical() << " start:" << startDatetime.toString(Qt::ISODate);
qCritical() << " workTime from:" << QTime::fromString(QString(wt.pwd_time_from.c_str()), Qt::ISODate);
qCritical() << " workTime to:" << QTime::fromString(QString(wt.pwd_time_to.c_str()), Qt::ISODate);
qCritical() << "daily_ticket_card_price:" << price.netto;
value = value.value_or(price);
} }
} }