compute_price_for_parking_ticket(): added parameter bool prepaid. Set to true as default.

This commit is contained in:
Gerhard Hoffmann 2024-02-22 09:42:02 +01:00
parent 6ba3963f25
commit c0f81f174a

View File

@ -352,7 +352,8 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
QDateTime &start_parking_time,
int netto_parking_time,
QDateTime &end_parking_time,
struct price_t *price)
struct price_t *price,
bool prepaid)
{
CalcState calcState;
double minMin = tariff->getPaymentOptions().pop_min_time;
@ -391,7 +392,7 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
start_parking_time, // starting time
end_parking_time, // return value: end time
netto_parking_time, // minutes, netto
false, true);
false, prepaid);
double minCost = tariff->getPaymentOptions().pop_min_price;
if (cost < minCost) {
calcState.setDesc(QString("minCost=%1, cost=%2").arg(minCost, cost));