• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/shipment.php
  • Класс: BitrixSaleShipment
  • Вызов: Shipment::update
private function update()
{
	$result = new Result();

	$registry = Registry::getInstance(static::getRegistryType());

	$this->setDeliveryRequestMarker();

	$r = static::updateInternal($this->getId(), $this->getFields()->getChangedValues());
	if (!$r->isSuccess())
	{
		/** @var OrderHistory $orderHistory */
		$orderHistory = $registry->getOrderHistoryClassName();

		$orderHistory::addAction(
			'SHIPMENT',
			$this->getParentOrderId(),
			'SHIPMENT_UPDATE_ERROR',
			$this->getId(),
			$this,
			["ERROR" => $r->getErrorMessages()]
		);

		$result->addErrors($r->getErrors());
	}

	return $result;
}