X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/641204dfbdb9fc870cdd2e7f9e3169a44693e7bf..c913a42e2208692b293f03c75c501e1d3fc23903:/projects/stargazer/plugins/store/postgresql/postgresql_store_tariffs.cpp diff --git a/projects/stargazer/plugins/store/postgresql/postgresql_store_tariffs.cpp b/projects/stargazer/plugins/store/postgresql/postgresql_store_tariffs.cpp index 352dab00..7d63b574 100644 --- a/projects/stargazer/plugins/store/postgresql/postgresql_store_tariffs.cpp +++ b/projects/stargazer/plugins/store/postgresql/postgresql_store_tariffs.cpp @@ -29,11 +29,12 @@ #include #include #include +#include #include #include "postgresql_store.h" -#include "stg_locker.h" +#include "stg/locker.h" //----------------------------------------------------------------------------- int POSTGRESQL_STORE::GetTariffsList(vector * tariffsList) const @@ -543,8 +544,8 @@ for (int i = 0; i < std::min(tuples, DIR_NUM); ++i) 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; }