GetDurationFromCost(): aded section if prepaid is not set.
E.g. for Linsinger Maschinenbau (Neuhauser, 741): here, the buying of food stamps is obviously only possible at certain times.
This commit is contained in:
parent
15801be88e
commit
1a350c0aeb
@ -496,9 +496,22 @@ double Calculator::GetCostFromDuration(Configuration* cfg,
|
||||
end_datetime.setTime(cs.getAllowedTimeRange().getTimeUntil());
|
||||
return cost;
|
||||
}
|
||||
} else {
|
||||
// it might be that in such a case even prepaid ("vorkauf")
|
||||
// is not allowed at any moment
|
||||
// added e.g. for neuhauser-linsinger maschinenbau (741):
|
||||
// the buying of food stamps ("essensmarken") is not allowed
|
||||
// at any moment
|
||||
CalcState cs = isParkingAllowed(cfg, start_datetime);
|
||||
if (cs) {
|
||||
end_datetime = start_datetime.addSecs(durationMinutes*60);
|
||||
double cost = GetCostFromDuration(cfg, start_datetime, end_datetime);
|
||||
end_datetime = start_datetime;
|
||||
end_datetime.setTime(cs.getAllowedTimeRange().getTimeUntil());
|
||||
return cost;
|
||||
}
|
||||
}
|
||||
|
||||
qCritical() << __PRETTY_FUNCTION__ << "NOT YET IMPLEMENTED";
|
||||
end_datetime = QDateTime();
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user