getDurationFromCost():

call
		Calculator::GetInstance().GetTimeSteps(cfg, 0, inputDate);
	for its side-effects.
	Timesteps will be used in the following calculation.
This commit is contained in:
Gerhard Hoffmann 2024-07-22 15:50:36 +02:00
parent 45694106a7
commit f7be0e471a

View File

@ -127,8 +127,13 @@ std::string Calculator::GetDurationFromCost(Configuration* cfg,
// Get input date // Get input date
QDateTime inputDate = QDateTime::fromString(startDatetimePassed,Qt::ISODate); QDateTime inputDate = QDateTime::fromString(startDatetimePassed,Qt::ISODate);
static const PaymentMethod paymentMethodId = Utilities::getPaymentMethodId(cfg); static const PaymentMethod paymentMethodId = Utilities::getPaymentMethodId(cfg);
//qCritical() << DBG_HEADER << " start" << inputDate.toString(Qt::ISODate);
//qCritical() << DBG_HEADER << "paymentMethodId" << static_cast<int>(paymentMethodId);
Calculator::GetInstance().GetTimeSteps(cfg, 0, inputDate);
if (paymentMethodId == PaymentMethod::Steps) { if (paymentMethodId == PaymentMethod::Steps) {
if (tariffIs24_7(cfg)) { if (tariffIs24_7(cfg)) {
// use tariff with structure as for instance Schoenau, Koenigsee: // use tariff with structure as for instance Schoenau, Koenigsee: