GetDurationFromCost():

Call ComputeDurationFromCost() of new tariff calculator for payment-method Unified.
This commit is contained in:
Gerhard Hoffmann 2024-09-27 14:10:02 +02:00
parent 1086e360e5
commit 18f09fccb9

View File

@ -679,6 +679,17 @@ Calculator::GetDurationFromCost(Configuration* cfg,
qCritical() << DBG_HEADER << " TODO";
}
} else
if (paymentMethodId == PaymentMethod::Unified) {
std::pair<CalcState, QDateTime> r =
ComputeDurationFromCost(cfg, QDateTime::fromString(startDatetimePassed, Qt::ISODate), cost);
CalcState cs = r.first;
qCritical() << __func__ << ":" << __LINE__ << cs.toString();
qCritical() << __func__ << ":" << __LINE__ << r.second.toString(Qt::ISODate);
return std::make_pair(r.first.toString().toStdString(), r.second);
} else
if (paymentMethodId == PaymentMethod::Steps) {
if (tariffIs24_7(cfg)) {
// use tariff with structure as for instance Schoenau, Koenigsee: