Added helper getTimeRangeStep() (useful for progressive tariff as for neuhauser/kirchdorf (743)
This commit is contained in:
parent
690267c388
commit
e0223b50f9
@ -90,6 +90,7 @@ namespace Utilities {
|
||||
uint32_t getMinimalParkingPrice(Configuration const *cfg, PaymentMethod methodId);
|
||||
uint32_t getMaximalParkingPrice(Configuration const *cfg, PaymentMethod methodId);
|
||||
uint32_t getFirstDurationStep(Configuration const *cfg, PaymentMethod methodId);
|
||||
uint32_t getTimeRangeStep(Configuration const *cfg, int step, PaymentMethod methodId);
|
||||
BusinessHours getBusinessHours(Configuration const *cfg, PaymentMethod methodId);
|
||||
uint32_t computeWeekDaysPrice(Configuration const *cfg, PaymentMethod id);
|
||||
double computeWeekDaysDurationUnit(Configuration const *cfg, PaymentMethod id);
|
||||
|
@ -397,6 +397,14 @@ uint32_t Utilities::getMaximalParkingPrice(Configuration const *cfg, PaymentMeth
|
||||
return std::max((int)cfg->PaymentOption.find(methodId)->second.pop_max_price, 0);
|
||||
}
|
||||
|
||||
uint32_t Utilities::getTimeRangeStep(Configuration const *cfg, int step, PaymentMethod methodId) {
|
||||
if (methodId == PaymentMethod::Progressive) {
|
||||
return std::max((int)cfg->TimeRange.find(step)->second.time_range_to_in_minutes_from_start, 0);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t Utilities::getFirstDurationStep(Configuration const *cfg, PaymentMethod methodId) {
|
||||
|
||||
int const popId = cfg->PaymentOption.find(methodId)->second.pop_id;
|
||||
|
Loading…
Reference in New Issue
Block a user