Use paymentOptionIndex in getPaymentOptions()

This commit is contained in:
Gerhard Hoffmann 2024-05-08 16:34:07 +02:00
parent 2a492475e3
commit eb20410849

View File

@ -476,6 +476,7 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
// DEBUG // DEBUG
qCritical() << "compute_price_for_parking_ticket() " << endl qCritical() << "compute_price_for_parking_ticket() " << endl
<< " paymentOptionIndex: " << paymentOptionIndex << endl
<< " start_parking_time: " << start_parking_time << endl << " start_parking_time: " << start_parking_time << endl
<< " netto_parking_time: " << netto_parking_time << endl << " netto_parking_time: " << netto_parking_time << endl
<< " minMin: " << minMin << endl << " minMin: " << minMin << endl
@ -502,7 +503,7 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
double cost = -1; double cost = -1;
if (start_parking_time.isValid()) { if (start_parking_time.isValid()) {
if (tariff->getPaymentOptions().pop_payment_method_id == PaymentMethod::Steps) { if (tariff->getPaymentOptions(paymentOptionIndex).pop_payment_method_id == PaymentMethod::Steps) {
// hier muesste man unterscheiden: uebertrag oder nicht? // hier muesste man unterscheiden: uebertrag oder nicht?
calcState = Calculator::GetInstance().isParkingAllowed(tariff, start_parking_time, calcState = Calculator::GetInstance().isParkingAllowed(tariff, start_parking_time,
netto_parking_time, paymentOptionIndex); netto_parking_time, paymentOptionIndex);