GetCostFromDuration(): take into account that (for Kirchdorf and progressive tariff)

there is no carry over.
This commit is contained in:
Gerhard Hoffmann 2024-02-19 12:00:45 +01:00
parent 9ea2037eca
commit 696ce644ab

View File

@ -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;
} }