• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/order.php
  • Класс: BitrixSaleOrder
  • Вызов: Order::lock
static function lock($id)
{
	global $USER;

	$result = new Result();
	$id = (int)$id;
	if ($id <= 0)
	{
		$result->addError( new ResultError(Loc::getMessage('SALE_ORDER_WRONG_ID'), 'SALE_ORDER_WRONG_ID') );
		return $result;
	}

	return static::updateInternal($id, array(
		'DATE_LOCK' => new MainTypeDateTime(),
		'LOCKED_BY' => (is_object($USER) ? $USER->GetID(): false)
	));
}