Upload purchase price in order products
This commit is contained in:
parent
2406c71652
commit
4b5dea4263
@ -1088,7 +1088,13 @@ class ICrmOrderActions
|
||||
$propCancel = (int)$propCancel['VALUE'];
|
||||
}
|
||||
|
||||
$pr = CCatalogProduct::GetList(array('ID' => $p['PRODUCT_ID']))->Fetch();
|
||||
$pr = CCatalogProduct::GetList(
|
||||
array(),
|
||||
array('ID' => $p['PRODUCT_ID']),
|
||||
false,
|
||||
array('nTopCount' => 1)
|
||||
)->Fetch();
|
||||
|
||||
if ($pr)
|
||||
$pr = $pr['PURCHASING_PRICE'];
|
||||
else
|
||||
@ -1106,6 +1112,9 @@ class ICrmOrderActions
|
||||
if (!$propCancel) {
|
||||
$item['initialPrice'] = (double) $p['PRICE'] + (double) $p['DISCOUNT_PRICE'];
|
||||
$item['discount'] = $p['DISCOUNT_PRICE'];
|
||||
if ($pr) {
|
||||
$item['purchasePrice'] = $pr;
|
||||
}
|
||||
}
|
||||
|
||||
$items[] = $item;
|
||||
|
Loading…
x
Reference in New Issue
Block a user