]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/configuration/rpcconfig/tariff_helper.cpp
Fixed tests.
[stg.git] / projects / stargazer / plugins / configuration / rpcconfig / tariff_helper.cpp
index fad12886f651d870866a459225efbf5e591416b9..85abf8205a5e59822db40850c3b37d4de905be45 100644 (file)
@@ -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);
 
@@ -65,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<xmlrpc_c::value> prices(