summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
26b7dcb)
TariffChangeIsAllow() function decfinition. The time_t timeout variable and
construction if ((currentTime > timeout) && (timeout != 0)) added in
TariffChangeIsAllowed().
return tariffData.dirPrice[dir].priceDayA;
}
//-----------------------------------------------------------------------------
return tariffData.dirPrice[dir].priceDayA;
}
//-----------------------------------------------------------------------------
-std::string TARIFF_IMPL::TariffChangeIsAllowed(const TARIFF & to) const
+std::string TARIFF_IMPL::TariffChangeIsAllowed(const TARIFF & to, time_t currentTime) const
+time_t timeout = GetChangePolicyTimeout();
+if ((currentTime > timeout) && (timeout != 0))
+ return "";
switch (GetChangePolicy())
{
case TARIFF::ALLOW:
switch (GetChangePolicy())
{
case TARIFF::ALLOW: