X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/19b1d5971c25819b3ccfe48cac16ff4e2daa6ec4..f907011b4827e85763372cdea76944b3b1cc3fd2:/include/stg/tariff_conf.h diff --git a/include/stg/tariff_conf.h b/include/stg/tariff_conf.h index 5b2eebb9..376ed378 100644 --- a/include/stg/tariff_conf.h +++ b/include/stg/tariff_conf.h @@ -27,12 +27,13 @@ #ifndef TARIFF_CONF_H #define TARIFF_CONF_H -#include -#include - +#include "tariff.h" #include "resetable.h" #include "const.h" +#include +#include + //----------------------------------------------------------------------------- enum { @@ -135,18 +136,20 @@ struct DIRPRICE_DATA_RES //----------------------------------------------------------------------------- struct TARIFF_CONF { - double fee; - double free; - int traffType; - double passiveCost; - std::string name; + double fee; + double free; + int traffType; + double passiveCost; + std::string name; + TARIFF::PERIOD period; TARIFF_CONF() : fee(0), free(0), traffType(TRAFF_UP_DOWN), passiveCost(0), - name() + name(), + period(TARIFF::MONTH) {} TARIFF_CONF(const std::string & n) @@ -154,7 +157,8 @@ struct TARIFF_CONF free(0), traffType(TRAFF_UP_DOWN), passiveCost(0), - name(n) + name(n), + period(TARIFF::MONTH) {} }; //----------------------------------------------------------------------------- @@ -165,7 +169,8 @@ struct TARIFF_CONF_RES free(), traffType(), passiveCost(), - name() + name(), + period() {} TARIFF_CONF_RES & operator=(const TARIFF_CONF & tc) @@ -175,6 +180,7 @@ struct TARIFF_CONF_RES traffType = tc.traffType; passiveCost = tc.passiveCost; name = tc.name; + period = tc.period; return *this; } @@ -186,14 +192,16 @@ struct TARIFF_CONF_RES tc.name = name; tc.passiveCost = passiveCost; tc.traffType = traffType; + tc.period = period; return tc; } - RESETABLE fee; - RESETABLE free; - RESETABLE traffType; - RESETABLE passiveCost; - RESETABLE name; + RESETABLE fee; + RESETABLE free; + RESETABLE traffType; + RESETABLE passiveCost; + RESETABLE name; + RESETABLE period; }; //----------------------------------------------------------------------------- struct TARIFF_DATA