Fix: read price for daily ticket directly from entry PaymentOptions

in tariff-file if it is not given as part of a Json-Product-Array in tariff-file.
This commit is contained in:
Gerhard Hoffmann 2024-06-04 11:24:15 +02:00
parent bc17213597
commit bdaea1106c

View File

@ -163,6 +163,17 @@ int CALCULATE_LIBRARY_API compute_product_price(Configuration const *cfg,
}
return product_price;
} else {
// SZEGED
int const pop_daily_card_price = cfg->getPaymentOptions().pop_daily_card_price;
qDebug() << QString("(%1:%2) no products defined in tariff-file").arg(__func__).arg(__LINE__);
qDebug() << QString("(%1:%2) pop_daily_card_price=%3").arg(__func__).arg(__LINE__).arg(pop_daily_card_price);
// static const PaymentMethod paymentMethodId = Utilities::getPaymentMethodId(cfg);
// return Utilities::getDailyTicketCardPrice(cfg, paymentMethodId);
return pop_daily_card_price;
}
} break;
case PERMIT_TYPE::TWENTY_FOUR_HOURS_TICKET: {