From 47452c4f255928397e0261860e4d78054fa79a80 Mon Sep 17 00:00:00 2001 From: Grisha Pomadchin Date: Mon, 5 Aug 2013 14:49:51 +0400 Subject: [PATCH] upd orderEdit method --- .../classes/general/events/ICrmOrderEvent.php | 12 ------------ intaro.intarocrm/install/version.php~ | 5 ----- 2 files changed, 17 deletions(-) delete mode 100755 intaro.intarocrm/install/version.php~ diff --git a/intaro.intarocrm/classes/general/events/ICrmOrderEvent.php b/intaro.intarocrm/classes/general/events/ICrmOrderEvent.php index 9d27758e..bbdee5d5 100644 --- a/intaro.intarocrm/classes/general/events/ICrmOrderEvent.php +++ b/intaro.intarocrm/classes/general/events/ICrmOrderEvent.php @@ -118,29 +118,17 @@ class ICrmOrderEvent { ICrmOrderActions::eventLog('ICrmOrderEvent::onSaleCancelOrder', 'catalog', 'module not found'); return true; } - - $arFields = CSaleOrder::GetById($ID); - - if (empty($arFields)) { - //handle err - self::eventLog('ICrmOrderEvent::onSaleCancelOrder', 'empty($arFields)', 'incorrect order'); - - return true; - } $api_host = COption::GetOptionString(self::$MODULE_ID, self::$CRM_API_HOST_OPTION, 0); $api_key = COption::GetOptionString(self::$MODULE_ID, self::$CRM_API_KEY_OPTION, 0); //saved cat params - $optionsOrderTypes = unserialize(COption::GetOptionString(self::$MODULE_ID, self::$CRM_ORDER_TYPES_ARR, 0)); $optionsPayStatuses = unserialize(COption::GetOptionString(self::$MODULE_ID, self::$CRM_PAYMENT_STATUSES, 0)); // --statuses $api = new IntaroCrm\RestApi($api_host, $api_key); $order = array( 'externalId' => (int) $ID, - 'customerId' => (int) $arFields['USER_ID'], - 'orderType' => $optionsOrderTypes[$arFields['PERSON_TYPE_ID']], 'status' => $optionsPayStatuses[$cancel], 'statusComment' => ICrmOrderActions::toJSON($reason) ); diff --git a/intaro.intarocrm/install/version.php~ b/intaro.intarocrm/install/version.php~ deleted file mode 100755 index b0b13837..00000000 --- a/intaro.intarocrm/install/version.php~ +++ /dev/null @@ -1,5 +0,0 @@ - '0.4.6', - 'VERSION_DATE' => '2013-07-25 15:35:00', -);