X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/641204dfbdb9fc870cdd2e7f9e3169a44693e7bf..237f834a52db0d12c85f70c5e65f48ec1923d00a:/projects/stargazer/plugins/configuration/rpcconfig/tariff_helper.cpp?ds=sidebyside diff --git a/projects/stargazer/plugins/configuration/rpcconfig/tariff_helper.cpp b/projects/stargazer/plugins/configuration/rpcconfig/tariff_helper.cpp index 91f60062..85abf820 100644 --- a/projects/stargazer/plugins/configuration/rpcconfig/tariff_helper.cpp +++ b/projects/stargazer/plugins/configuration/rpcconfig/tariff_helper.cpp @@ -1,3 +1,5 @@ +#include // xmlrpc-c devs have missed something :) + #include "tariff_helper.h" void TARIFF_HELPER::GetTariffInfo(xmlrpc_c::value * info) const @@ -10,6 +12,7 @@ structVal["fee"] = xmlrpc_c::value_double(data.tariffConf.fee); structVal["freemb"] = xmlrpc_c::value_double(data.tariffConf.free); structVal["passivecost"] = xmlrpc_c::value_double(data.tariffConf.passiveCost); structVal["traffType"] = xmlrpc_c::value_int(data.tariffConf.traffType); +structVal["period"] = xmlrpc_c::value_string(TARIFF::PeriodToString(data.tariffConf.period)); std::vector prices(DIR_NUM); @@ -63,6 +66,11 @@ if ((it = structVal.find("traffType")) != structVal.end()) data.tariffConf.traffType = xmlrpc_c::value_int(it->second); } +if ((it = structVal.find("period")) != structVal.end()) + { + data.tariffConf.period = TARIFF::StringToPeriod(xmlrpc_c::value_string(it->second)); + } + if ((it = structVal.find("dirprices")) != structVal.end()) { std::vector prices(