fix summ null error
This commit is contained in:
parent
5e33d50f98
commit
b9e681a683
@ -605,9 +605,13 @@ class ICrmOrderActions
|
|||||||
if(!isset($order['deliveryCost']))
|
if(!isset($order['deliveryCost']))
|
||||||
$order['deliveryCost'] = $arFields['PRICE_DELIVERY'];
|
$order['deliveryCost'] = $arFields['PRICE_DELIVERY'];
|
||||||
|
|
||||||
|
if(!isset($order['summ']) || (isset($order['summ']) && !$order['summ']))
|
||||||
|
$order['summ'] = $arFields['PRICE'] - $arFields['PRICE_DELIVERY'];
|
||||||
|
|
||||||
// orderUpdate
|
// orderUpdate
|
||||||
$arFields = self::clearArr(array(
|
$arFields = self::clearArr(array(
|
||||||
'PRICE_DELIVERY' => $order['deliveryCost'],
|
'PRICE_DELIVERY' => $order['deliveryCost'],
|
||||||
|
'PRICE' => $order['summ'] + (double) $order['deliveryCost'],
|
||||||
'DATE_MARKED' => $order['markDatetime'],
|
'DATE_MARKED' => $order['markDatetime'],
|
||||||
'USER_ID' => $userId, //$order['customer']
|
'USER_ID' => $userId, //$order['customer']
|
||||||
'PAY_SYSTEM_ID' => $optionsPayTypes[$order['paymentType']],
|
'PAY_SYSTEM_ID' => $optionsPayTypes[$order['paymentType']],
|
||||||
@ -620,9 +624,6 @@ class ICrmOrderActions
|
|||||||
'COMMENTS' => $order['managerComment']
|
'COMMENTS' => $order['managerComment']
|
||||||
));
|
));
|
||||||
|
|
||||||
if(isset($order['summ']) && $order['summ'])
|
|
||||||
$arFields['PRICE'] => $order['summ'] + (double) $order['deliveryCost'];
|
|
||||||
|
|
||||||
$GLOBALS['INTARO_CRM_FROM_HISTORY'] = true;
|
$GLOBALS['INTARO_CRM_FROM_HISTORY'] = true;
|
||||||
|
|
||||||
CSaleOrder::Update($order['externalId'], $arFields);
|
CSaleOrder::Update($order['externalId'], $arFields);
|
||||||
|
Loading…
Reference in New Issue
Block a user