From 6be0c419e91a659c10478055156b70f40750bbfd Mon Sep 17 00:00:00 2001 From: Elena Mamontova Date: Mon, 8 Aug 2016 14:28:03 +0300 Subject: [PATCH] Ticket 37. The message variable definition moved from if() construction in the ProcessNewMonth() function. --- projects/stargazer/user_impl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/stargazer/user_impl.cpp b/projects/stargazer/user_impl.cpp index 7701bde3..8c38d909 100644 --- a/projects/stargazer/user_impl.cpp +++ b/projects/stargazer/user_impl.cpp @@ -1184,13 +1184,13 @@ if (nextTariff.ConstData() != "") } else { - if (tariff->TariffChangeIsAllowed(*nt) == "") + std::string message = tariff->TariffChangeIsAllowed(*nt); + if (message == "") { property.tariffName.Set(nextTariff, sysAdmin, login, store); } else { - std::string message = tariff->TariffChangeIsAllowed(*nt); WriteServLog("Tariff change is prohibited for user %s. %s", login.c_str(), message.c_str()); -- 2.43.2