diff --git a/intaro.intarocrm/classes/general/events/ICrmOrderEvent.php b/intaro.intarocrm/classes/general/events/ICrmOrderEvent.php index cf12c209..cead90e0 100644 --- a/intaro.intarocrm/classes/general/events/ICrmOrderEvent.php +++ b/intaro.intarocrm/classes/general/events/ICrmOrderEvent.php @@ -32,7 +32,7 @@ class ICrmOrderEvent { * @param mixed $ID - Order id * @param mixed $arFields - Order arFields */ - function onBeforeUpdateOrder($ID, $arFields) { + function onUpdateOrder($ID, $arFields) { if(isset($GLOBALS['INTARO_CRM_ORDER_ADD']) && $GLOBALS['INTARO_CRM_ORDER_ADD']) return; @@ -123,13 +123,13 @@ class ICrmOrderEvent { if (is_array($arFields) && !empty($arFields)) { $arFieldsNew = array( - 'USER_ID' => $arOrder['USER_ID'], - 'ID' => $ID, + 'USER_ID' => $arOrder['USER_ID'], + 'ID' => $ID, 'PERSON_TYPE_ID' => $arOrder['PERSON_TYPE_ID'], - 'CANCELED' => $arOrder['CANCELED'], - 'STATUS_ID' => $arOrder['STATUS_ID'], - 'DATE_INSERT' => $arOrder['DATE_INSERT'], - 'LID' => $arOrder['LID'] + 'CANCELED' => $arOrder['CANCELED'], + 'STATUS_ID' => $arOrder['STATUS_ID'], + 'DATE_INSERT' => $arOrder['DATE_INSERT'], + 'LID' => $arOrder['LID'] ); $arFieldsNew = array_merge($arFieldsNew, $arFields); diff --git a/intaro.intarocrm/install/index.php b/intaro.intarocrm/install/index.php index 6587d9ce..d178d6fa 100755 --- a/intaro.intarocrm/install/index.php +++ b/intaro.intarocrm/install/index.php @@ -1039,7 +1039,7 @@ class intaro_intarocrm extends CModule { UnRegisterModuleDependences("sale", "OnSalePayOrder", $this->MODULE_ID, "ICrmOrderEvent", "onSalePayOrder"); UnRegisterModuleDependences("sale", "OnSaleCancelOrder", $this->MODULE_ID, "ICrmOrderEvent", "onSaleCancelOrder"); UnRegisterModuleDependences("sale", "OnOrderNewSendEmail", $this->MODULE_ID, "ICrmOrderEvent", "onSendOrderMail"); - UnRegisterModuleDependences("sale", "OnBeforeOrderUpdate", $this->MODULE_ID, "ICrmOrderEvent", "onBeforeUpdateOrder"); + UnRegisterModuleDependences("sale", "OnOrderUpdate", $this->MODULE_ID, "ICrmOrderEvent", "onUpdateOrder"); UnRegisterModuleDependences("sale", "OnBeforeOrderAdd", $this->MODULE_ID, "ICrmOrderEvent", "onBeforeOrderAdd"); if (CModule::IncludeModule("catalog")) { if (file_exists($_SERVER['DOCUMENT_ROOT'] . '/bitrix/php_interface/include/catalog_export/' . $this->INTARO_CRM_EXPORT . '_run.php')) { diff --git a/intaro.intarocrm/options.php b/intaro.intarocrm/options.php index bebd3615..cb45c217 100755 --- a/intaro.intarocrm/options.php +++ b/intaro.intarocrm/options.php @@ -218,13 +218,13 @@ if (isset($_POST['Update']) && ($_POST['Update'] == 'Y')) { if (($orderDischarge != $previousDischarge) && ($orderDischarge == 0)) { // remove depenedencies UnRegisterModuleDependences("sale", "OnOrderNewSendEmail", $mid, "ICrmOrderEvent", "onSendOrderMail"); - UnRegisterModuleDependences("sale", "OnBeforeOrderUpdate", $mid, "ICrmOrderEvent", "onBeforeUpdateOrder"); + UnRegisterModuleDependences("sale", "OnOrderUpdate", $mid, "ICrmOrderEvent", "onUpdateOrder"); UnRegisterModuleDependences("sale", "OnBeforeOrderAdd", $mid, "ICrmOrderEvent", "onBeforeOrderAdd"); } else if (($orderDischarge != $previousDischarge) && ($orderDischarge == 1)) { // event dependencies RegisterModuleDependences("sale", "OnOrderNewSendEmail", $mid, "ICrmOrderEvent", "onSendOrderMail"); - RegisterModuleDependences("sale", "OnBeforeOrderUpdate", $mid, "ICrmOrderEvent", "onBeforeUpdateOrder"); + RegisterModuleDependences("sale", "OnOrderUpdate", $mid, "ICrmOrderEvent", "onUpdateOrder"); RegisterModuleDependences("sale", "OnBeforeOrderAdd", $mid, "ICrmOrderEvent", "onBeforeOrderAdd"); }