From 40440e28d3dbc6b152f5009a855f8477c03d6a7f Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Mon, 22 Jul 2024 15:56:04 +0200 Subject: [PATCH] Read pop_accumulate_prices and pop_accumulate_durations. --- library/src/configuration.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/library/src/configuration.cpp b/library/src/configuration.cpp index dfacdab..fec537f 100644 --- a/library/src/configuration.cpp +++ b/library/src/configuration.cpp @@ -602,6 +602,10 @@ bool Configuration::ParseJson(Configuration* cfg, const char* json) this->currentPaymentOptions.last().pop_prepaid_option_id = k->value.GetInt(); } else if (strcmp(inner_obj_name, "pop_truncate_last_interpolation_step") == 0) { this->currentPaymentOptions.last().pop_truncate_last_interpolation_step = k->value.GetBool(); + } else if (strcmp(inner_obj_name, "pop_accumulate_prices") == 0) { + this->currentPaymentOptions.last().pop_accumulate_prices = k->value.GetBool(); + } else if (strcmp(inner_obj_name, "pop_accumulate_durations") == 0) { + this->currentPaymentOptions.last().pop_accumulate_durations = k->value.GetBool(); } else if (strcmp(inner_obj_name, "pop_carry_over_option_id") == 0) { this->currentPaymentOptions.last().pop_carry_over_option_id = k->value.GetInt(); } else if (strcmp(inner_obj_name, "pop_carry_over") == 0) { @@ -834,6 +838,7 @@ std::optional Configuration::getInterpolationEnd(QDateTime const &sta std::optional value = std::nullopt; QDateTime interpolationEndTime = start; + //qCritical() << "(" << __func__ << ":" << __LINE__ << ") computed interpol end:" << interpolationEndTime.toString(Qt::ISODate); int price = 0; @@ -918,8 +923,8 @@ std::optional Configuration::getInterpolationEnd(QDateTime const &sta //qCritical() << "(" << __func__ << ":" << __LINE__ << ") price:" << price; if (price >= interpolation.dynamic_until_price) { - qCritical() << "(" << __func__ << ":" << __LINE__ << ") price:" << price; - qCritical() << "(" << __func__ << ":" << __LINE__ << ") computed interpol endr:" << interpolationEndTime.toString(Qt::ISODate); + // qCritical() << "(" << __func__ << ":" << __LINE__ << ") price:" << price; + // qCritical() << "(" << __func__ << ":" << __LINE__ << ") computed interpol end:" << interpolationEndTime.toString(Qt::ISODate); value = value.value_or(interpolationEndTime); break; }