1
0
mirror of synced 2025-02-21 09:23:14 +03:00

puchasing price fix

This commit is contained in:
Grisha Pomadchin 2014-10-28 16:32:58 +04:00
parent 570a01ea77
commit b536c07e78

View File

@ -363,7 +363,7 @@ class ICrmOrderActions
$USER->Logout();
} else { // for agent; to add order User
// find similar login! (email / name can be used as login, due to settings diff)
$rsUser = CUser::GetList(($by='id'), ($order='desc'), array('LOGIN' => '%intarocrm%'));
$rsUser = CUser::GetList(($by='ID'), ($order='DESC'), array('LOGIN' => '%intarocrm%'));
if($arUser = $rsUser->Fetch()) {
$USER = new CUser;
@ -1241,10 +1241,11 @@ class ICrmOrderActions
}
$pr = CCatalogProduct::GetList(array(), array('ID' => $p['PRODUCT_ID']))->Fetch();
if ($pr)
$pr = $pr['PURCHASING_PRICE'];
else
if(!$pr) {
$pr = '';
unset($item['productId']);
} else $pr = $pr['PURCHASING_PRICE'];
$item = array(
'discountPercent' => 0,