• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/cashbox/manager.php
  • Класс: BitrixSaleCashboxManager
  • Вызов: Manager::getAvailableCashboxList
static function getAvailableCashboxList(Check $check): array
{
	$cashboxList = [];
	$firstIteration = true;

	$payment = CheckManager::getPaymentByCheck($check);
	if ($payment && self::canPaySystemPrint($payment))
	{
		$cashbox = self::getCashboxByPayment($payment);
		if ($cashbox)
		{
			$cashboxList[] = $cashbox;
		}
	}
	else
	{
		$entities = $check->getEntities();
		foreach ($entities as $entity)
		{
			$items = self::getListWithRestrictions($entity);
			if ($firstIteration)
			{
				$cashboxList = $items;
				$firstIteration = false;
			}
			else
			{
				$cashboxList = array_intersect_assoc($items, $cashboxList);
			}
		}

		foreach ($cashboxList as $key => $cashbox)
		{
			if (self::isPaySystemCashbox($cashbox['HANDLER']))
			{
				unset($cashboxList[$key]);
			}
		}
	}

	return $cashboxList;
}