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

	if ($entity instanceof SalePayment)
	{
		/** @var SalePaymentCollection $col */
		$col = $entity->getCollection();
		$order = $col->getOrder();
	}
	elseif ($entity instanceof SaleShipment)
	{
		/** @var SaleShipmentCollection $col */
		$col = $entity->getCollection();
		$order = $col->getOrder();
	}
	else
	{
		throw new MainArgumentTypeException("entities");
	}

	return $order;
}