1
0
mirror of synced 2025-02-16 15:03:14 +03:00

Merge branch 'generated-items' of github.com:intarocrm/bitrix-module

This commit is contained in:
Grisha Pomadchin 2014-10-02 13:47:40 +04:00
commit eb69ba73ec

View File

@ -1234,7 +1234,7 @@ class ICrmOrderActions
$propCancel = (int)$propCancel['VALUE'];
}
$pr = CCatalogProduct::GetList(array('ID' => $p['PRODUCT_ID']))->Fetch();
$pr = CCatalogProduct::GetList(array(), array('ID' => $p['PRODUCT_ID']))->Fetch();
if ($pr)
$pr = $pr['PURCHASING_PRICE'];
else
@ -1248,6 +1248,10 @@ class ICrmOrderActions
'comment' => $p['NOTES'],
);
//if this item generated through admin interface, then unset productId
if(empty($pr))
unset($item['productId']);
//if it is canceled product don't send price
if (!$propCancel) {
$item['initialPrice'] = (double) $p['PRICE'] + (double) $p['DISCOUNT_PRICE'];
@ -1481,4 +1485,4 @@ class ICrmOrderActions
if($location = $dbLocation->Fetch())
return $location['ID'];
}
}
}