1
0
mirror of synced 2024-11-25 14:56:09 +03:00

api changes fix

This commit is contained in:
Grisha Pomadchin 2013-10-31 10:49:20 +04:00
parent 45c180c40e
commit 7cdda7aa11
2 changed files with 19 additions and 17 deletions

View File

@ -311,20 +311,20 @@ class ICrmOrderActions
if(!isset($order['externalId']) && !$order['externalId']) { if(!isset($order['externalId']) && !$order['externalId']) {
// we dont need new orders without any customers // we dont need new orders without any customers (can check only for externalId)
if(!isset($order['customer']) && !$order['customer']) if(!isset($order['customer']['externalId']) && !$order['customer']['externalId'])
continue; continue;
// new order // new order
$newOrderFields = array( $newOrderFields = array(
'LID' => $defaultSiteId, //<----! 'LID' => $defaultSiteId,
'PERSON_TYPE_ID' => $optionsOrderTypes[$order['orderType']], // <------! 'PERSON_TYPE_ID' => $optionsOrderTypes[$order['orderType']],
'PAYED' => 'N', 'PAYED' => 'N',
'CANCELED' => 'N', 'CANCELED' => 'N',
'STATUS_ID' => 'N', 'STATUS_ID' => 'N',
'PRICE' => 0, 'PRICE' => 0,
'CURRENCY' => 'RUB', 'CURRENCY' => 'RUB',
'USER_ID' => $order['customer'], // <--------! 'USER_ID' => $order['customer']['externalId'],
'PAY_SYSTEM_ID' => 0, 'PAY_SYSTEM_ID' => 0,
'PRICE_DELIVERY' => 0, 'PRICE_DELIVERY' => 0,
'DELIVERY_ID' => 0, 'DELIVERY_ID' => 0,
@ -356,9 +356,11 @@ class ICrmOrderActions
if(!$arFields || empty($arFields)) if(!$arFields || empty($arFields))
continue; continue;
$userId = $arFields['USER_ID'];
if(isset($order['customer']) && $order['customer']) $userId = $order['customer'];
$LID = $arFields['LID']; $LID = $arFields['LID'];
$userId = $arFields['USER_ID'];
if(isset($order['customer']['externalId']) && $order['customer']['externalId'])
$userId = $order['customer']['externalId'];
$rsOrderProps = CSaleOrderPropsValue::GetList(array(), array('ORDER_ID' => $arFields['ID'])); $rsOrderProps = CSaleOrderPropsValue::GetList(array(), array('ORDER_ID' => $arFields['ID']));

View File

@ -1,5 +1,5 @@
<? <?
$arModuleVersion = array( $arModuleVersion = array(
"VERSION" => "0.4.3", "VERSION" => "0.4.3",
"VERSION_DATE" => "2013-10-30 16:04:00", "VERSION_DATE" => "2013-10-31 10:47:00",
); );