GetCostFromDuration():

recompute timestep list to make sure that time step is found in it.
This commit is contained in:
Gerhard Hoffmann 2024-08-02 11:11:20 +02:00
parent b394ed46cc
commit 36b3e85d1b

View File

@ -1018,7 +1018,8 @@ uint32_t Calculator::GetCostFromDuration(Configuration * cfg,
if (paymentMethodId == PaymentMethod::Steps ||
paymentMethodId == PaymentMethod::Degressive) {
int const timeStepInMinutes = start.secsTo(end) / 60;
QList<int> tlist = Calculator::GetInstance().GetTimeSteps(cfg, paymentOptionIndex, start);
qCritical() << DBG_HEADER << "timeStepList" << timeStepInMinutes << tlist;
qCritical() << DBG_HEADER << "timeStepInMinutes" << timeStepInMinutes << start.toString(Qt::ISODate);
return GetPriceForTimeStep(cfg, timeStepInMinutes, paymentOptionIndex);