Always reset pop_max_price to configured value.
This commit is contained in:
parent
212c792b77
commit
03dd6c44da
@ -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<struct price_t> p =
|
||||
|
Loading…
Reference in New Issue
Block a user