Parsing of pop_plus_steps/pop_minus_steps
This commit is contained in:
parent
89b05ffadc
commit
f0677374ec
@ -598,6 +598,14 @@ bool Configuration::ParseJson(Configuration* cfg, const char* json)
|
||||
if (k->value.IsInt()) {
|
||||
this->currentPaymentOptions.last().pop_use_only_for_duration = k->value.GetInt();
|
||||
}
|
||||
} else if (strcmp(inner_obj_name, "pop_plus_steps") == 0) {
|
||||
if (k->value.IsInt()) {
|
||||
this->currentPaymentOptions.last().pop_plus_steps = k->value.GetInt();
|
||||
}
|
||||
} else if (strcmp(inner_obj_name, "pop_minus_steps") == 0) {
|
||||
if (k->value.IsInt()) {
|
||||
this->currentPaymentOptions.last().pop_minus_steps = k->value.GetInt();
|
||||
}
|
||||
} else if (strcmp(inner_obj_name, "pop_payment_method_id") == 0) {
|
||||
this->currentPaymentOptions.last().pop_payment_method_id = k->value.GetInt();
|
||||
} else if (strcmp(inner_obj_name, "pop_day_end_time") == 0) {
|
||||
@ -999,6 +1007,9 @@ int Configuration::getPaymentOptionIndex(QDateTime const &dt) const {
|
||||
for (int opt=0; opt < numOptions; ++opt) {
|
||||
uint64_t const pop_business_hours = getPaymentOptions(opt).pop_business_hours;
|
||||
|
||||
if (pop_business_hours == 0) { // 0 == 24/7
|
||||
return opt;
|
||||
}
|
||||
|
||||
uint64_t p = 0;
|
||||
int const dayOfWeek = dt.date().dayOfWeek();
|
||||
|
Loading…
Reference in New Issue
Block a user