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

	if ($recordedStopSeconds < $minExactEnd)
	{
		$violations[] = $this->createViolation(
			WorktimeViolation::TYPE_EARLY_ENDING,
			$this->getRecord()->getRecordedStopTimestamp(),
			$recordedStopSeconds - $minExactEnd
		);
	}

	return $violations;
}