• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/order.php
  • Класс: BitrixSaleOrder
  • Вызов: Order::onBeforeSave
protected function onBeforeSave()
{
	$registry = Registry::getInstance(static::getRegistryType());

	/** @var EntityMarker $entityMarker */
	$entityMarker = $registry->getEntityMarkerClassName();

	$result = InternalsCatalogProvider::save($this);
	if ($result->hasWarnings())
	{
		$entityMarker::addMarker($this, $this, $result);
		if ($this->getId() > 0)
		{
			static::updateInternal($this->getId(), ['MARKED' => 'Y']);
		}
	}

	$entityMarker::refreshMarkers($this);

	return $result;
}