ComputeDurationFromCost():
brutto-time must be updated in case of an carry-over-section.
This commit is contained in:
parent
5a77958e8d
commit
5a55ad6ef0
@ -554,10 +554,9 @@ Calculator::ComputeDurationFromCost(Configuration *cfg,
|
||||
.arg(netto_parking_time_in_minutes)
|
||||
.arg(free_parking_time_in_minutes);
|
||||
|
||||
if (std::optional<ATBTariffCarryOver> co = getCarryOver(cfg, inputDate.addSecs(brutto_parking_time_in_minutes * 60))) {
|
||||
if (std::optional<ATBTariffCarryOver> co = getCarryOver(cfg, dt)) {
|
||||
TimeRange const &carryOverTimeRange = co.value().m_range;
|
||||
free_parking_time_in_minutes += carryOverTimeRange.m_duration;
|
||||
}
|
||||
|
||||
brutto_parking_time_in_minutes = free_parking_time_in_minutes + netto_parking_time_in_minutes;
|
||||
dt = inputDate.addSecs(brutto_parking_time_in_minutes * 60);
|
||||
@ -569,6 +568,7 @@ Calculator::ComputeDurationFromCost(Configuration *cfg,
|
||||
.arg(brutto_parking_time_in_minutes)
|
||||
.arg(netto_parking_time_in_minutes)
|
||||
.arg(free_parking_time_in_minutes);
|
||||
}
|
||||
|
||||
if (std::optional<ATBTariffService> serv = getService(cfg, dt)) {
|
||||
TimeRange const &serviceTimeRange = serv.value().m_range;
|
||||
|
Loading…
Reference in New Issue
Block a user