• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Reservation/ProductRowReservation.php
  • Класс: Bitrix\Crm\Reservation\ProductRowReservation
  • Вызов: ProductRowReservation::loadSaleReserve
private function loadSaleReserve(): void
{
	$productRowId = $this->productRow ? $this->productRow->getId() : 0;
	if ($productRowId > 0)
	{
		$basketReservation = new BasketReservation();
		$basketReservation->addProduct([
			'ID' => $productRowId,
		]);
		$reservedProducts = $basketReservation->getReservedProducts();

		if (isset($reservedProducts[$productRowId]))
		{
			$reserveFields = $reservedProducts[$productRowId];
			$this->saleReserveId = (int)$reserveFields[self::RESERVE_ID];
		}
	}
}