diff --git a/library/src/calculator_functions.cpp b/library/src/calculator_functions.cpp index 8d8a712..551d737 100644 --- a/library/src/calculator_functions.cpp +++ b/library/src/calculator_functions.cpp @@ -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; }