From 1df0d658278035b7493e943ea4165d0b441b4b16 Mon Sep 17 00:00:00 2001 From: Grisha Pomadchin Date: Wed, 12 Feb 2014 09:44:35 +0400 Subject: [PATCH] upd custom type func calls --- .../classes/general/ICrmOrderActions.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/intaro.intarocrm/classes/general/ICrmOrderActions.php b/intaro.intarocrm/classes/general/ICrmOrderActions.php index 5ea4705f..72c43cca 100755 --- a/intaro.intarocrm/classes/general/ICrmOrderActions.php +++ b/intaro.intarocrm/classes/general/ICrmOrderActions.php @@ -376,7 +376,7 @@ class ICrmOrderActions foreach ($orderHistory as $order) { // custom orderType functunion - if(function_exists('intarocrm_set_order_type')) { + if(function_exists('intarocrm_get_order_type') && function_exists('intarocrm_set_order_type')) { $orderType = intarocrm_set_order_type($order); if($orderType) $optionsOrderTypes[$order['orderType']] = $orderType; @@ -470,6 +470,14 @@ class ICrmOrderActions } if(isset($order['externalId']) && $order['externalId']) { + + // custom orderType functunion + if(function_exists('intarocrm_get_order_type') && function_exists('intarocrm_set_order_type')) { + $orderType = intarocrm_set_order_type($order); + if($orderType) + $optionsOrderTypes[$order['orderType']] = $orderType; + } + $arFields = CSaleOrder::GetById($order['externalId']); // incorrect order @@ -1112,7 +1120,7 @@ class ICrmOrderActions } // custom orderType functunion - if(function_exists('intarocrm_get_order_type')) { + if(function_exists('intarocrm_get_order_type') && function_exists('intarocrm_set_order_type')) { $orderType = intarocrm_get_order_type($arFields); if($orderType) $resOrder['orderType'] = $orderType;