Pass PERMIT_TYPE to get_minimal_parkingtime() and get_maximal_parkingtime()
to override default parameter value.
This commit is contained in:
		@@ -211,8 +211,8 @@ int CALCULATE_LIBRARY_API compute_product_price(Configuration const *cfg,
 | 
			
		||||
 | 
			
		||||
            if (product.size() > 0) {
 | 
			
		||||
                if (productStart && productEnd) {
 | 
			
		||||
                    int pop_min_time = get_minimal_parkingtime(cfg); // in minutes
 | 
			
		||||
                    int pop_max_time = get_maximal_parkingtime(cfg); // in minutes
 | 
			
		||||
                    int pop_min_time = get_minimal_parkingtime(cfg, PERMIT_TYPE::TWENTY_FOUR_HOURS_TICKET); // in minutes
 | 
			
		||||
                    int pop_max_time = get_maximal_parkingtime(cfg, PERMIT_TYPE::TWENTY_FOUR_HOURS_TICKET); // in minutes
 | 
			
		||||
                    if (pop_max_time >= pop_min_time) {
 | 
			
		||||
                        *productStart = start;
 | 
			
		||||
                        *productEnd = start.addSecs(pop_max_time*60);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user