- Модуль: sale
- Путь к файлу: ~/bitrix/modules/sale/lib/order.php
- Класс: BitrixSaleOrder
- Вызов: Order::addChangesToHistory
protected function addChangesToHistory($name, $oldValue = null, $value = null)
{
if ($this->getId() > 0)
{
$historyFields = array();
if ($name == "PRICE")
{
$historyFields['CURRENCY'] = $this->getCurrency();
}
if ($name == "RESPONSIBLE_ID")
{
$historyFields[$name] = $value;
}
$historyFields['OLD_'.$name] = $oldValue;
$registry = Registry::getInstance(static::getRegistryType());
/** @var OrderHistory $orderHistory */
$orderHistory = $registry->getOrderHistoryClassName();
$orderHistory::addField(
'ORDER',
$this->getId(),
$name,
$oldValue,
$value,
$this->getId(),
$this,
$historyFields
);
}
}