From 81d515eb7f32e1b8a318739c685ff1ada49a09c8 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Wed, 21 Feb 2024 11:13:53 +0100 Subject: [PATCH] GetCostFromDuration(): set endtime to start in case cost==0. --- library/src/calculator_functions.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/library/src/calculator_functions.cpp b/library/src/calculator_functions.cpp index f4389fb..9e65faf 100644 --- a/library/src/calculator_functions.cpp +++ b/library/src/calculator_functions.cpp @@ -548,6 +548,7 @@ double Calculator::GetCostFromDuration(Configuration* cfg, if (current.time() >= to) { if (carryOverNotSet) { + end_datetime = start; return 0; } else { QDateTime const dt = start;