• Модуль: timeman
  • Путь к файлу: ~/bitrix/modules/timeman/lib/repository/schedule/shiftplanrepository.php
  • Класс: BitrixTimemanRepositoryScheduleShiftPlanRepository
  • Вызов: ShiftPlanRepository::findActiveByRecord
public function findActiveByRecord($record)
{
	if ($record->getShiftId() <= 0)
	{
		return null;
	}
	$start = $record->buildRecordedStartDateTime();
	$start->setTimezone(new DateTimeZone('UTC'));
	return $this->findActiveByComplexId(
		$record->getShiftId(),
		$record->getUserId(),
		new Date($start->format(ShiftPlanTable::DATE_FORMAT), ShiftPlanTable::DATE_FORMAT)
	);
}