Merge branch 'kleipeda-experimental' of /home/siegert/atbfs01entwicklung/Elektronik/PTU/git_bare_repos/libmobilisis-calc into kleipeda-experimental
This commit is contained in:
commit
cb69d3ca2f
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user