summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
6a910eb)
TariffChangeIsAllowed() function.
switch (GetChangePolicy())
{
case TARIFF::ALLOW:
switch (GetChangePolicy())
{
case TARIFF::ALLOW:
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() + ".";
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() + ".";
case TARIFF::TO_EXPENSIVE:
case TARIFF::TO_EXPENSIVE:
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() + ".";
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 "Current tariff " + GetName() + ", new tariff " + to.GetName() + ".";
return "Current tariff " + GetName() + ", new tariff " + to.GetName() + ".";
}
}
//-----------------------------------------------------------------------------
}
}
//-----------------------------------------------------------------------------