• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/shipmentcollection.php
  • Класс: BitrixSaleShipmentCollection
  • Вызов: ShipmentCollection::addItem
protected function addItem(InternalsCollectableEntity $shipment)
{
	/** @var Shipment $shipment */
	$shipment = parent::addItem($shipment);

	/** @var Order $order */
	if (!$order = $this->getOrder())
	{
		throw new MainObjectNotFoundException('Entity "Order" not found');
	}

	$order->onShipmentCollectionModify(EventActions::ADD, $shipment);

	return $shipment;
}