• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/cashbox/checkmanager.php
  • Класс: BitrixSaleCashboxCheckManager
  • Вызов: CheckManager::collectInfo
static function collectInfo(array $filter = array())
{
	$result = array();

	$typeMap = CheckManager::getCheckTypeMap();

	$dbRes = self::getList(
		array(
			'select' => array('*'),
			'filter' => $filter
		)
	);

	while ($data = $dbRes->fetch())
	{
		$data['LINK'] = '';
		if (!empty($data['LINK_PARAMS']))
		{
			$cashbox = Manager::getObjectById($data['CASHBOX_ID']);
			if ($cashbox)
			{
				$data['LINK'] = $cashbox->getCheckLink($data['LINK_PARAMS']);
			}
		}

		/** @var Check $type */
		$type = $typeMap[$data['TYPE']];
		if (class_exists($type))
		{
			$data['TYPE_NAME'] = $type::getName();
		}

		$result[$data['ID']] = $data;
	}

	return $result;
}