fix onOrderUpdateEvent
This commit is contained in:
parent
77abe318ac
commit
e3ceadfe67
@ -417,6 +417,8 @@ class ICrmOrderActions
|
|||||||
'STATUS_ID' => $optionsPayStatuses[$order['status']]
|
'STATUS_ID' => $optionsPayStatuses[$order['status']]
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$GLOBALS['FROM_HISTORY'] = true;
|
||||||
|
|
||||||
CSaleOrder::Update($order['externalId'], $arFields);
|
CSaleOrder::Update($order['externalId'], $arFields);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,9 @@ class ICrmOrderEvent {
|
|||||||
* @param mixed $arFields - Order arFields
|
* @param mixed $arFields - Order arFields
|
||||||
*/
|
*/
|
||||||
function onUpdateOrder($ID, $arFields = array()) {
|
function onUpdateOrder($ID, $arFields = array()) {
|
||||||
|
if(isset($GLOBALS['FROM_HISTORY']) && $GLOBALS['FROM_HISTORY'])
|
||||||
|
return;
|
||||||
|
|
||||||
self::writeDataOnOrderCreate($ID);
|
self::writeDataOnOrderCreate($ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,6 +38,7 @@ class ICrmOrderEvent {
|
|||||||
*/
|
*/
|
||||||
function onSendOrderMail($ID, &$eventName, &$arFields) {
|
function onSendOrderMail($ID, &$eventName, &$arFields) {
|
||||||
self::writeDataOnOrderCreate($ID);
|
self::writeDataOnOrderCreate($ID);
|
||||||
|
COption::SetOptionString(self::$MODULE_ID, self::$CRM_ORDER_LAST_ID, $ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -89,8 +93,6 @@ class ICrmOrderEvent {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
COption::SetOptionString(self::$MODULE_ID, self::$CRM_ORDER_LAST_ID, $ID);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user