Pass PERMIT_TYPE to get_minimal_parkingtime() and get_maximal_parkingtime()

to override default parameter value.
This commit is contained in:
Gerhard Hoffmann 2024-07-29 11:22:22 +02:00
parent 31b1dd1690
commit 356e3be178

View File

@ -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);