• Модуль: timeman
  • Путь к файлу: ~/bitrix/modules/timeman/lib/service/worktime/violation/fixedscheduleviolationbuilder.php
  • Класс: BitrixTimemanServiceWorktimeViolationFixedScheduleViolationBuilder
  • Вызов: FixedScheduleViolationBuilder::buildOffsetStartViolations
private function buildOffsetStartViolations($recordedStartSeconds)
{
	$maxOffsetStart = $this->getViolationRules()['MAX_OFFSET_START'];
	if (!$this->getShift() || !ViolationRules::isViolationConfigured($maxOffsetStart))
	{
		return [];
	}

	$violations = [];
	if ($recordedStartSeconds > $this->getShift()->getWorkTimeStart() + $maxOffsetStart)
	{
		$violations[] = $this->createViolation(
			WorktimeViolation::TYPE_LATE_START,
			$this->getRecord()->getRecordedStartTimestamp(),
			$recordedStartSeconds - $this->getShift()->getWorkTimeStart() - $maxOffsetStart
		);
	}

	return $violations;
}