GetCostFromDuration():
recompute timestep list to make sure that time step is found in it.
This commit is contained in:
parent
b394ed46cc
commit
36b3e85d1b
@ -1018,7 +1018,8 @@ uint32_t Calculator::GetCostFromDuration(Configuration * cfg,
|
|||||||
if (paymentMethodId == PaymentMethod::Steps ||
|
if (paymentMethodId == PaymentMethod::Steps ||
|
||||||
paymentMethodId == PaymentMethod::Degressive) {
|
paymentMethodId == PaymentMethod::Degressive) {
|
||||||
int const timeStepInMinutes = start.secsTo(end) / 60;
|
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);
|
qCritical() << DBG_HEADER << "timeStepInMinutes" << timeStepInMinutes << start.toString(Qt::ISODate);
|
||||||
|
|
||||||
return GetPriceForTimeStep(cfg, timeStepInMinutes, paymentOptionIndex);
|
return GetPriceForTimeStep(cfg, timeStepInMinutes, paymentOptionIndex);
|
||||||
|
Loading…
Reference in New Issue
Block a user