diff --git a/library/src/calculate_price.cpp b/library/src/calculate_price.cpp index 0201600..7f30d97 100644 --- a/library/src/calculate_price.cpp +++ b/library/src/calculate_price.cpp @@ -1036,6 +1036,10 @@ CalcState CALCULATE_LIBRARY_API compute_duration_for_parking_ticket( double price, QString &duration, PermitType permitType) { + + tariff->getPaymentOptions(0).pop_max_price + = tariff->getPaymentOptions(0).pop_max_price_save; + CalcState calcState; QDate const d(1970, 1, 1); QTime const t(0, 0, 0); @@ -1091,6 +1095,9 @@ CalcState CALCULATE_LIBRARY_API compute_duration_for_parking_ticket( QDateTime &ticketEndTime, PermitType permitType) { + tariff->getPaymentOptions(0).pop_max_price + = tariff->getPaymentOptions(0).pop_max_price_save; + CalcState calcState; bool prepaid = true; @@ -1418,6 +1425,9 @@ CalcState CALCULATE_LIBRARY_API compute_duration_for_daily_ticket(parking_tariff QDateTime &ticketEndTime, PermitType /* PermitType */) { + tariff->getPaymentOptions(0).pop_max_price + = tariff->getPaymentOptions(0).pop_max_price_save; + CalcState calcState; if (start_parking_time.isValid()) { @@ -1449,8 +1459,11 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_daily_ticket( QDateTime &endDatetime, PERMIT_TYPE permitType, struct price_t *price) {// return value - CalcState calcState; + tariff->getPaymentOptions(0).pop_max_price + = tariff->getPaymentOptions(0).pop_max_price_save; + + CalcState calcState; if (startDatetime.isValid()) { if (std::optional p =