1
0
mirror of synced 2024-11-25 14:56:09 +03:00

discount fix

This commit is contained in:
Grisha Pomadchin 2013-11-15 16:51:57 +04:00
parent 63d03327f3
commit 344a952f99

View File

@ -635,6 +635,7 @@ class ICrmOrderActions
CSaleOrder::Update($order['externalId'], $arFields);
// set STATUS_ID
if($optionsPayStatuses[$order['status']])
CSaleOrder::StatusOrder($order['externalId'], $optionsPayStatuses[$order['status']]);
// uncancel order
@ -646,6 +647,7 @@ class ICrmOrderActions
CSaleOrder::CancelOrder($order['externalId'], "Y", $order['statusComment']);
// set PAYED
if($optionsPayment[$order['paymentStatus']])
CSaleOrder::PayOrder($order['externalId'], $optionsPayment[$order['paymentStatus']]);
$dateStart = new \DateTime();
@ -846,12 +848,9 @@ class ICrmOrderActions
else
$pr = '';
if($p['DISCOUNT_VALUE'])
$p['DISCOUNT_PRICE'] = null;
$items[] = array(
'initialPrice' => (double) $p['PRICE'] + (double) $p['DISCOUNT_PRICE'],
'purchasePrice' => $pr,
//'purchasePrice' => $pr,
'discount' => $p['DISCOUNT_PRICE'],
'discountPercent' => $p['DISCOUNT_VALUE'],
'quantity' => $p['QUANTITY'],