GetCostFromDuration(): take into account that (for Kirchdorf and progressive tariff)
there is no carry over.
This commit is contained in:
parent
9ea2037eca
commit
696ce644ab
@ -525,14 +525,17 @@ double Calculator::GetCostFromDuration(Configuration* cfg,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (current.time() >= to) {
|
if (current.time() >= to) {
|
||||||
QDateTime const dt = start;
|
if (carryOverNotSet) {
|
||||||
start = start.addDays(1);
|
return 0;
|
||||||
start.setTime(QTime(0, 0, 0));
|
} else {
|
||||||
|
QDateTime const dt = start;
|
||||||
|
start = start.addDays(1);
|
||||||
|
start.setTime(QTime(0, 0, 0));
|
||||||
|
|
||||||
durationMinutesBrutto += dt.secsTo(start) / 60;
|
durationMinutesBrutto += dt.secsTo(start) / 60;
|
||||||
current = start;
|
current = start;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user