• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/repository/shipmentrepository.php
  • Класс: BitrixSaleRepositoryShipmentRepository
  • Вызов: ShipmentRepository::getById
public function getById(int $id): ?SaleShipment
{
	/** @var SaleShipment $shipmentClass */
	$shipmentClass = SaleRegistry::getInstance(SaleRegistry::REGISTRY_TYPE_ORDER)->getShipmentClassName();

	$shipmentRow = $shipmentClass::getList([
		'select' => ['ID', 'ORDER_ID'],
		'filter' => [
			'=ID' => $id
		]
	])->fetch();
	if (!$shipmentRow)
	{
		return null;
	}

	return static::getInstance()->getByRow($shipmentRow);
}