X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/78c67dad18539233b81cfb16144339dc389d5981..d4bb6b1e2cb9698e1153f70394fd2ded364bd043:/projects/stargazer/plugins/configuration/rpcconfig/tariff_helper.cpp?ds=inline

diff --git a/projects/stargazer/plugins/configuration/rpcconfig/tariff_helper.cpp b/projects/stargazer/plugins/configuration/rpcconfig/tariff_helper.cpp
index fad12886..26b4e993 100644
--- a/projects/stargazer/plugins/configuration/rpcconfig/tariff_helper.cpp
+++ b/projects/stargazer/plugins/configuration/rpcconfig/tariff_helper.cpp
@@ -12,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<xmlrpc_c::value> prices(DIR_NUM);
 
@@ -62,7 +63,12 @@ if ((it = structVal.find("passivecost")) != structVal.end())
 
 if ((it = structVal.find("traffType")) != structVal.end())
     {
-    data.tariffConf.traffType = xmlrpc_c::value_int(it->second);
+    data.tariffConf.traffType = static_cast<TARIFF::TRAFF_TYPE>(xmlrpc_c::value_int(it->second).cvalue());
+    }
+
+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())