]> git.stg.codes - stg.git/blobdiff - projects/stargazer/tariff_impl.cpp
Ticket 37. In 'case' where TARIFF::TO_EXPENSIVE, operation '>' changed to '>=' in
[stg.git] / projects / stargazer / tariff_impl.cpp
index ad0eaedf66f37654d96b14a332a740289bd49291..a3084fbcd810c781fdd895be95c6148b797400f1 100644 (file)
@@ -155,14 +155,14 @@ switch (GetChangePolicy())
         if (to.GetFee() < GetFee())
             return "";
         else
-            return "Current tariff " + GetName() + " is more cheap than new tariff " + to.GetName() + ". The policy is " + TARIFF::ChangePolicyToString(GetChangePolicy()).c_str() + ".";
+            return "New tariff '" + to.GetName() + "' is more expensive than current tariff '" + GetName() + "'. The policy is '" + TARIFF::ChangePolicyToString(GetChangePolicy()) + "'.";
     case TARIFF::TO_EXPENSIVE:
-        if (to.GetFee() > GetFee())
+        if (to.GetFee() >= GetFee())
             return "";
         else
-            return "Current tariff " + GetName() + " is more expensive than new tariff " + to.GetName() + ". The policy is " + TARIFF::ChangePolicyToString(GetChangePolicy()).c_str() + ".";
+            return "New tariff '" + to.GetName() + "' is more cheap than current tariff '" + GetName() + "'. The policy is '" + TARIFF::ChangePolicyToString(GetChangePolicy()) + "'.";
     case TARIFF::DENY:
-        return "Current tariff " + GetName() + ", new tariff " + to.GetName() + ".";
+        return "Current tariff '" + GetName() + "', new tariff '" + to.GetName() + "'. The policy is '" + TARIFF::ChangePolicyToString(GetChangePolicy()) + "'.";
     }
 }
 //-----------------------------------------------------------------------------