+#include <cmath>
+
#include "stg/tariffs.h"
#include "stg/admin.h"
#include "stg/store.h"
#include "stg/common.h"
#include "stg/user_property.h"
#include "user_helper.h"
-#include "utils.h"
//------------------------------------------------------------------------------
if ((it = structVal.find("cash")) != structVal.end())
{
double value(xmlrpc_c::value_double(it->second));
- if (ptr->GetProperty().cash.Get() != value)
+ if (std::fabs(ptr->GetProperty().cash.Get() - value) > 1.0e-3)
if (!ptr->GetProperty().cash.Set(value,
admin,
login,
if ((it = structVal.find("credit")) != structVal.end())
{
double value(xmlrpc_c::value_double(it->second));
- if (ptr->GetProperty().credit.Get() != value)
+ if (std::fabs(ptr->GetProperty().credit.Get() - value) > 1.0e-3)
if (!ptr->GetProperty().credit.Set(value,
admin,
login,
if ((it = structVal.find("freemb")) != structVal.end())
{
double value(xmlrpc_c::value_double(it->second));
- if (ptr->GetProperty().freeMb.Get() != value)
+ if (std::fabs(ptr->GetProperty().freeMb.Get() - value) > 1.0e-3)
if (!ptr->GetProperty().freeMb.Set(value,
admin,
login,