Merge branch 'kleipeda-experimental' of /home/siegert/atbfs01entwicklung/Elektronik/PTU/git_bare_repos/libmobilisis-calc into kleipeda-experimental

This commit is contained in:
Siegfried Siegert 2024-07-26 13:35:56 +02:00
commit cb69d3ca2f
Signed by: SiegfriedSiegert
GPG Key ID: 68371E015E8F0B03

View File

@ -2723,6 +2723,10 @@ uint32_t Calculator::GetDurationForPrice(Configuration *cfg, int price) const {
int const pop_id = cfg->getPaymentOptions().pop_id;
int const pop_accumulate_prices = cfg->getPaymentOptions().pop_accumulate_prices;
qCritical() << "(" << __func__ << ":" << __LINE__ << ") accumulate prices" << pop_accumulate_prices;
int new_price = 0;
uint32_t duration = 0;
uint32_t duration_previous = 0;
@ -2744,14 +2748,19 @@ uint32_t Calculator::GetDurationForPrice(Configuration *cfg, int price) const {
if (pop_accumulate_prices) {
new_price += pra_price;
qCritical() << "(" << __func__ << ":" << __LINE__ << ") pra_price:" << pra_price;
qCritical() << "(" << __func__ << ":" << __LINE__ << ") new_price:" << new_price;
if (new_price <= price) {
duration_previous = durationUnit;
duration_previous = durationUnit;
qCritical() << "(" << __func__ << ":" << __LINE__ << ") duration_previous" << duration_previous;
} else {
qCritical() << "(" << __func__ << ":" << __LINE__ << ") duration_previous" << duration_previous;
return duration_previous;
}
}
}
qCritical() << "(" << __func__ << ":" << __LINE__ << ") duration" << duration;
return duration;
}