diff --git a/library/src/calculator_functions.cpp b/library/src/calculator_functions.cpp index 005dd71..73459dc 100644 --- a/library/src/calculator_functions.cpp +++ b/library/src/calculator_functions.cpp @@ -679,6 +679,17 @@ Calculator::GetDurationFromCost(Configuration* cfg, qCritical() << DBG_HEADER << " TODO"; } } else + if (paymentMethodId == PaymentMethod::Unified) { + std::pair r = + ComputeDurationFromCost(cfg, QDateTime::fromString(startDatetimePassed, Qt::ISODate), cost); + + CalcState cs = r.first; + + qCritical() << __func__ << ":" << __LINE__ << cs.toString(); + qCritical() << __func__ << ":" << __LINE__ << r.second.toString(Qt::ISODate); + + return std::make_pair(r.first.toString().toStdString(), r.second); + } else if (paymentMethodId == PaymentMethod::Steps) { if (tariffIs24_7(cfg)) { // use tariff with structure as for instance Schoenau, Koenigsee: