Fix: compute_next_time_step(): removed check for product ids.
This commit is contained in:
		@@ -430,15 +430,16 @@ int CALCULATE_LIBRARY_API compute_next_timestep(parking_tariff_t *tariff, int cu
 | 
			
		||||
    qCritical() << "   compute_next_timestep()     currentTimeMinutes: " << currentTimeMinutes;
 | 
			
		||||
    qCritical() << "   compute_next_timestep() up/down (1=up, 0=down): " << UpDown;
 | 
			
		||||
 | 
			
		||||
    std::optional<ATBPaymentOption> paymentOption = tariff->getPaymentOptionForKey(permitType.get());
 | 
			
		||||
    if (!paymentOption.has_value()) {
 | 
			
		||||
        return currentTimeMinutes;
 | 
			
		||||
    }
 | 
			
		||||
    // FIXME
 | 
			
		||||
    //std::optional<ATBPaymentOption> paymentOption = tariff->getPaymentOptionForKey(permitType.get());
 | 
			
		||||
    //if (!paymentOption.has_value()) {
 | 
			
		||||
    //    qCritical() << "   compute_next_timestep() ERROR";
 | 
			
		||||
    //    return currentTimeMinutes;
 | 
			
		||||
    //}
 | 
			
		||||
 | 
			
		||||
    int const paymentOptionIndex = tariff->getPaymentOptionIndex(permitType);
 | 
			
		||||
    qCritical() << "   compute_next_timestep()   payment option index: " << paymentOptionIndex;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    Configuration const *cfg = tariff;
 | 
			
		||||
 | 
			
		||||
    // compute payment method id (e.g. Linear=3, Steps=4)
 | 
			
		||||
@@ -510,6 +511,7 @@ int CALCULATE_LIBRARY_API compute_next_timestep(parking_tariff_t *tariff, int cu
 | 
			
		||||
                return  currentTimeMinutes;
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
                qCritical() << "   compute_next_timestep() return next time step:" << stepList[currentStepIndex + 1];
 | 
			
		||||
                return stepList[currentStepIndex + 1];
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
@@ -519,6 +521,7 @@ int CALCULATE_LIBRARY_API compute_next_timestep(parking_tariff_t *tariff, int cu
 | 
			
		||||
                return  currentTimeMinutes;
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
                qCritical() << "   compute_next_timestep() return next time step:" << stepList[currentStepIndex - 1];
 | 
			
		||||
                return stepList[currentStepIndex - 1];
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user