SaleTarget::getPreviousConfigurationId

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. SaleTarget
  4. getPreviousConfigurationId
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/widget/custom/saletarget.php
  • Класс: Bitrix\Crm\Widget\Custom\SaleTarget
  • Вызов: SaleTarget::getPreviousConfigurationId
private function getPreviousConfigurationId(array $configuration)
{
	$fields = SaleTargetTable::getList(array(
		'select' => array('ID'),
		'filter' => array(
			'=PERIOD_TYPE' => $configuration['period']['type'],
			' $configuration['leftBorder']
		),
		'order' => array('LEFT_BORDER' => 'DESC'),
		'limit' => 1,
	))->fetch();

	return $fields ? (int)$fields['ID'] : null;
}

Добавить комментарий