]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/store/firebird/firebird_store_tariffs.cpp
Ticket 26. The const MODULE_SETTINGS & ms parameter added to the int
[stg.git] / projects / stargazer / plugins / store / firebird / firebird_store_tariffs.cpp
index f757d0553896865ebcbda52ea69d484e64c0316b..f7aef9663a7269a6e358a42309acf9e0dd830450 100644 (file)
@@ -275,13 +275,10 @@ try
     st->Get(3, td->tariffConf.fee);
     st->Get(4, td->tariffConf.free);
     st->Get(5, td->tariffConf.passiveCost);
-    st->Get(6, td->tariffConf.traffType);
+    //st->Get(6, td->tariffConf.traffType);
+    td->tariffConf.traffType = TARIFF::IntToTraffType(Get<int>(st, 6));
     if (schemaVersion > 0)
-        {
-        std::string period;
-        st->Get(7, period);
-        td->tariffConf.period = TARIFF::StringToPeriod(period);
-        }
+        td->tariffConf.period = TARIFF::StringToPeriod(Get<std::string>(st, 7));
     st->Close();
     st->Prepare("select * from tb_tariffs_params where fk_tariff = ?");
     st->Set(1, id);