Pass PERMIT_TYPE to get_minimal_parkingtime() and get_maximal_parkingtime()
to override default parameter value.
This commit is contained in:
parent
31b1dd1690
commit
356e3be178
@ -211,8 +211,8 @@ int CALCULATE_LIBRARY_API compute_product_price(Configuration const *cfg,
|
|||||||
|
|
||||||
if (product.size() > 0) {
|
if (product.size() > 0) {
|
||||||
if (productStart && productEnd) {
|
if (productStart && productEnd) {
|
||||||
int pop_min_time = get_minimal_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); // 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) {
|
if (pop_max_time >= pop_min_time) {
|
||||||
*productStart = start;
|
*productStart = start;
|
||||||
*productEnd = start.addSecs(pop_max_time*60);
|
*productEnd = start.addSecs(pop_max_time*60);
|
||||||
|
Loading…
Reference in New Issue
Block a user