Call getDurationForPrice() in GetDurationForCost().

This commit is contained in:
Gerhard Hoffmann 2023-11-23 09:38:34 +01:00
parent b80cd5e6ef
commit 574161ff76

View File

@ -118,6 +118,15 @@ std::string Calculator::GetDurationFromCost(Configuration* cfg,
bool nextDay,
bool prepaid)
{
// use tariff with structure as for instance Schnau, Koenigsee:
// without given YearPeriod, SpecialDays and SpecialDaysWorktime
if (cfg->YearPeriod.size() == 0
&& cfg->SpecialDays.size() == 0
&& cfg->SpecialDaysWorktime.size() == 0)
{
return QString().setNum(GetDurationForPrice(cfg, price)).toStdString();
}
// Get input date
QDateTime inputDate = QDateTime::fromString(start_datetime,Qt::ISODate);