From 4d5583df2d088561183d05e3c3c3b34c5243f3c7 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Tue, 7 May 2024 14:59:00 +0200 Subject: [PATCH] Handling for pop_carry_over_traget. --- library/include/mobilisis/payment_opt.h | 2 ++ library/src/configuration.cpp | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/library/include/mobilisis/payment_opt.h b/library/include/mobilisis/payment_opt.h index d5e8cd3..e5c2fca 100644 --- a/library/include/mobilisis/payment_opt.h +++ b/library/include/mobilisis/payment_opt.h @@ -24,6 +24,7 @@ public: pop_min_price = 0; pop_max_price = 0; pop_carry_over = -1; + pop_carry_over_target = false; pop_carry_over_time_range_id = -1; pop_carry_over_start_time_range = -1; pop_carry_over_end_time_range = -1; @@ -43,6 +44,7 @@ public: double pop_min_price; double pop_max_price; int pop_carry_over; + bool pop_carry_over_target; int pop_carry_over_time_range_id; int pop_carry_over_start_time_range; int pop_carry_over_end_time_range; diff --git a/library/src/configuration.cpp b/library/src/configuration.cpp index 3cd9b4b..a1370a7 100644 --- a/library/src/configuration.cpp +++ b/library/src/configuration.cpp @@ -486,6 +486,11 @@ bool Configuration::ParseJson(Configuration* cfg, const char* json) } } } + } else if (strcmp(inner_obj_name, "pop_carry_over_target") == 0) { + if (k->value.IsBool()) { + bool const v = k->value.GetBool(); + this->currentPaymentOptions.last().pop_carry_over_target = v; + } } break; case MemberType::DurationType: