#include <string>
#include <vector>
#include <sstream>
+#include <cmath>
#include <libpq-fe.h>
#include "postgresql_store.h"
-#include "stg_locker.h"
+#include "stg/locker.h"
//-----------------------------------------------------------------------------
int POSTGRESQL_STORE::GetTariffsList(vector<string> * tariffsList) const
tuple >> td->dirPrice[dir].hNight;
tuple >> td->dirPrice[dir].mNight;
- if (td->dirPrice[dir].priceDayA == td->dirPrice[dir].priceNightA &&
- td->dirPrice[dir].priceDayB == td->dirPrice[dir].priceNightB)
+ if (std::fabs(td->dirPrice[dir].priceDayA - td->dirPrice[dir].priceNightA) > 1.0e-3 &&
+ std::fabs(td->dirPrice[dir].priceDayB - td->dirPrice[dir].priceNightB) > 1.0e-3)
{
td->dirPrice[dir].singlePrice = true;
}