From b536c07e7831f1b518b4dbaed977b7ec6e03d03b Mon Sep 17 00:00:00 2001 From: Grisha Pomadchin Date: Tue, 28 Oct 2014 16:32:58 +0400 Subject: [PATCH] puchasing price fix --- intaro.intarocrm/classes/general/ICrmOrderActions.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/intaro.intarocrm/classes/general/ICrmOrderActions.php b/intaro.intarocrm/classes/general/ICrmOrderActions.php index 4db7f778..5c8a867a 100755 --- a/intaro.intarocrm/classes/general/ICrmOrderActions.php +++ b/intaro.intarocrm/classes/general/ICrmOrderActions.php @@ -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,