• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/shipmentcollection.php
  • Класс: BitrixSaleShipmentCollection
  • Вызов: ShipmentCollection::isAllowAutoEdit
protected function isAllowAutoEdit(BasketItem $basketItem)
{
	if ($this->count() === 1
		||
		(
			$this->count() === 2
			&&
			$this->isExistsSystemShipment()
		)
	)
	{
		if (!$this->getSystemShipment()->isExistBasketItem($basketItem)
			|| (int)$basketItem->getId() === 0
		)
		{
			foreach ($this->getNotSystemItems() as $shipment)
			{
				if (!$shipment->isAllowDelivery()
					&& !$shipment->isCanceled()
					&& !$shipment->isShipped()
				)
				{
					/** @var DeliveryServicesBase $deliveryService */
					if ($deliveryService = $shipment->getDelivery())
					{
						return $deliveryService->isAllowEditShipment();
					}
				}
			}
		}
	}

	return false;
}