X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/641204dfbdb9fc870cdd2e7f9e3169a44693e7bf..11422f8dd8d0bbd2a9316974a634e185ec18fd9f:/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; }