• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/shipment.php
  • Класс: BitrixSaleShipment
  • Вызов: Shipment::needReservation
public function needReservation()
{
	$condition = Configuration::getProductReservationCondition();

	if ($condition === ReserveCondition::ON_CREATE)
	{
		return true;
	}

	if ($condition === ReserveCondition::ON_PAY
		|| $condition === ReserveCondition::ON_FULL_PAY)
	{
		$order = $this->getOrder();
		if ($condition === ReserveCondition::ON_FULL_PAY)
		{
			return $order->isPaid();
		}

		return $order->getPaymentCollection()->hasPaidPayment();
	}

	if ($this->isSystem())
	{
		return false;
	}

	return
		(
			$condition === ReserveCondition::ON_ALLOW_DELIVERY
			&& $this->isAllowDelivery()
		)
		|| (
			$condition === ReserveCondition::ON_SHIP
			&& $this->isShipped()
		)
	;
}