]> git.stg.codes - stg.git/blobdiff - projects/stargazer/user_impl.cpp
Ticket 37. const TARIFF * tariff definition, tariff checking and tariff->GetTariffData()
[stg.git] / projects / stargazer / user_impl.cpp
index 72a3378f771876873f39aab1caf8ea408efde56b..f8335525a00acb3020df41ab84649a8e5e4b9ff7 100644 (file)
@@ -1184,13 +1184,13 @@ if (nextTariff.ConstData() != "")
         }
     else
         {
-        if (tariff->TariffChangelsAllowed(*nt) == "")
+        std::string message = tariff->TariffChangeIsAllowed(*nt);
+        if (message.empty())
             {
             property.tariffName.Set(nextTariff, sysAdmin, login, store);
             }
         else
             {
-            std::string message = tariff->TariffChangelsAllowed(*nt);
             WriteServLog("Tariff change is prohibited for user %s. %s",
                          login.c_str(),
                          message.c_str());