From f7be0e471ad4aa79db51289500d50e27c6583ae4 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Mon, 22 Jul 2024 15:50:36 +0200 Subject: [PATCH] getDurationFromCost(): call Calculator::GetInstance().GetTimeSteps(cfg, 0, inputDate); for its side-effects. Timesteps will be used in the following calculation. --- library/src/calculator_functions.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/library/src/calculator_functions.cpp b/library/src/calculator_functions.cpp index dbe8447..9a7e966 100644 --- a/library/src/calculator_functions.cpp +++ b/library/src/calculator_functions.cpp @@ -127,8 +127,13 @@ std::string Calculator::GetDurationFromCost(Configuration* cfg, // Get input date QDateTime inputDate = QDateTime::fromString(startDatetimePassed,Qt::ISODate); - static const PaymentMethod paymentMethodId = Utilities::getPaymentMethodId(cfg); + + //qCritical() << DBG_HEADER << " start" << inputDate.toString(Qt::ISODate); + //qCritical() << DBG_HEADER << "paymentMethodId" << static_cast(paymentMethodId); + + Calculator::GetInstance().GetTimeSteps(cfg, 0, inputDate); + if (paymentMethodId == PaymentMethod::Steps) { if (tariffIs24_7(cfg)) { // use tariff with structure as for instance Schoenau, Koenigsee: