Fix: use second.pun_duration instead of second.pun_id

Minor: add debug output.
This commit is contained in:
Gerhard Hoffmann 2023-12-08 10:14:48 +01:00
parent 5598b02816
commit 2d696941a5

View File

@ -387,7 +387,15 @@ uint32_t Utilities::getMinimalParkingPrice(Configuration const *cfg, PaymentMeth
}
uint32_t Utilities::getFirstDurationStep(Configuration const *cfg, PaymentMethod methodId) {
int popId = cfg->PaymentOption.find(methodId)->second.pop_id;
int punId = cfg->PaymentRate.find(popId)->second.pra_payment_unit_id;
return cfg->Duration.find(punId)->second.pun_id;
int const popId = cfg->PaymentOption.find(methodId)->second.pop_id;
int const punId = cfg->PaymentRate.find(popId)->second.pra_payment_unit_id;
uint32_t const firstDurationStep= cfg->Duration.find(punId)->second.pun_duration;
qCritical() << "getFirstDurationStep() payment-method-id:" << (int)methodId;
qCritical() << "getFirstDurationStep() pop-id:" << popId;
qCritical() << "getFirstDurationStep() pun-id:" << punId;
qCritical() << "getFirstDurationStep() first-step:" << firstDurationStep;
return firstDurationStep;
}