From b9e681a683676ca73bab7952eb799cab826de23b Mon Sep 17 00:00:00 2001 From: Grisha Pomadchin Date: Wed, 13 Nov 2013 23:05:19 +0400 Subject: [PATCH] fix summ null error --- intaro.intarocrm/classes/general/ICrmOrderActions.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/intaro.intarocrm/classes/general/ICrmOrderActions.php b/intaro.intarocrm/classes/general/ICrmOrderActions.php index b89aa8af..346bbfb5 100755 --- a/intaro.intarocrm/classes/general/ICrmOrderActions.php +++ b/intaro.intarocrm/classes/general/ICrmOrderActions.php @@ -605,9 +605,13 @@ class ICrmOrderActions if(!isset($order['deliveryCost'])) $order['deliveryCost'] = $arFields['PRICE_DELIVERY']; + if(!isset($order['summ']) || (isset($order['summ']) && !$order['summ'])) + $order['summ'] = $arFields['PRICE'] - $arFields['PRICE_DELIVERY']; + // orderUpdate $arFields = self::clearArr(array( 'PRICE_DELIVERY' => $order['deliveryCost'], + 'PRICE' => $order['summ'] + (double) $order['deliveryCost'], 'DATE_MARKED' => $order['markDatetime'], 'USER_ID' => $userId, //$order['customer'] 'PAY_SYSTEM_ID' => $optionsPayTypes[$order['paymentType']], @@ -619,9 +623,6 @@ class ICrmOrderActions 'USER_DESCRIPTION' => $order['customerComment'], 'COMMENTS' => $order['managerComment'] )); - - if(isset($order['summ']) && $order['summ']) - $arFields['PRICE'] => $order['summ'] + (double) $order['deliveryCost']; $GLOBALS['INTARO_CRM_FROM_HISTORY'] = true;