Ticket 37. In 'case' where TARIFF::TO_EXPENSIVE, operation '>' changed to '>=' in
authorElena Mamontova <helenh463@gmail.com>
Wed, 14 Sep 2016 14:44:19 +0000 (17:44 +0300)
committerElena Mamontova <helenh463@gmail.com>
Wed, 14 Sep 2016 14:44:19 +0000 (17:44 +0300)
if() construction in TariffChangeIsAllowed() function.

projects/stargazer/tariff_impl.cpp

index 3459097..a3084fb 100644 (file)
@@ -157,7 +157,7 @@ switch (GetChangePolicy())
         else
             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 "New tariff '" + to.GetName() + "' is more cheap than current tariff '" + GetName() + "'. The policy is '" + TARIFF::ChangePolicyToString(GetChangePolicy()) + "'.";