From 82ca274c45a499cfadf7b241fea35728d7e89de0 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Tue, 13 Aug 2024 14:57:12 +0200 Subject: [PATCH] Fetch pop_accumulate_durations form tariff-file (to decide if durrations have to be summed up). --- library/src/calculator_functions.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/library/src/calculator_functions.cpp b/library/src/calculator_functions.cpp index 6a92ee3..de03763 100644 --- a/library/src/calculator_functions.cpp +++ b/library/src/calculator_functions.cpp @@ -492,12 +492,11 @@ std::string Calculator::GetDurationFromCost(Configuration* cfg, #endif int const pop_accumulate_prices = cfg->getPaymentOptions(paymentOptionIndex).pop_accumulate_prices; - // int const pop_accumulate_durations = cfg->getPaymentOptions(paymentOptionIndex).pop_accumulate_durations; + int const pop_accumulate_durations = cfg->getPaymentOptions(paymentOptionIndex).pop_accumulate_durations; int price = 0; int new_price = 0; int durationInSecs = 0; uint32_t duration_previous = 0; - bool found = false; for (auto[itr, rangeEnd] = cfg->PaymentRate.equal_range(pop_id); itr != rangeEnd; ++itr) { int const pra_price = itr->second.pra_price;