Fixed getWeekDayWorkTime(). Parameter 'time' must be inside [from, to[.
This commit is contained in:
parent
868df3dd32
commit
f87399ed44
@ -579,9 +579,11 @@ Configuration::getWeekDayWorkTime(QTime const &time, Qt::DayOfWeek dayOfWeek) {
|
|||||||
|
|
||||||
std::multimap<int, ATBWeekDaysWorktime>::const_iterator it = this->WeekDaysWorktime.find((int)dayOfWeek);
|
std::multimap<int, ATBWeekDaysWorktime>::const_iterator it = this->WeekDaysWorktime.find((int)dayOfWeek);
|
||||||
if (it != this->WeekDaysWorktime.cend()) {
|
if (it != this->WeekDaysWorktime.cend()) {
|
||||||
|
|
||||||
ATBWeekDaysWorktime const &wt = it->second;
|
ATBWeekDaysWorktime const &wt = it->second;
|
||||||
if (QTime::fromString(wt.pwd_time_from.c_str(), Qt::ISODate) >= time
|
|
||||||
&& QTime::fromString(wt.pwd_time_to.c_str(), Qt::ISODate) < time) {
|
if (time >= QTime::fromString(wt.pwd_time_from.c_str(), Qt::ISODate)
|
||||||
|
&& time < QTime::fromString(wt.pwd_time_to.c_str(), Qt::ISODate)) {
|
||||||
value = value.value_or(wt);
|
value = value.value_or(wt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user