1
0
mirror of synced 2024-11-25 23:06:08 +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,7 +635,8 @@ class ICrmOrderActions
CSaleOrder::Update($order['externalId'], $arFields); CSaleOrder::Update($order['externalId'], $arFields);
// set STATUS_ID // set STATUS_ID
CSaleOrder::StatusOrder($order['externalId'], $optionsPayStatuses[$order['status']]); if($optionsPayStatuses[$order['status']])
CSaleOrder::StatusOrder($order['externalId'], $optionsPayStatuses[$order['status']]);
// uncancel order // uncancel order
if($wasCanaceled && ($optionsPayStatuses[$order['status']] != 'YY')) if($wasCanaceled && ($optionsPayStatuses[$order['status']] != 'YY'))
@ -646,7 +647,8 @@ class ICrmOrderActions
CSaleOrder::CancelOrder($order['externalId'], "Y", $order['statusComment']); CSaleOrder::CancelOrder($order['externalId'], "Y", $order['statusComment']);
// set PAYED // set PAYED
CSaleOrder::PayOrder($order['externalId'], $optionsPayment[$order['paymentStatus']]); if($optionsPayment[$order['paymentStatus']])
CSaleOrder::PayOrder($order['externalId'], $optionsPayment[$order['paymentStatus']]);
$dateStart = new \DateTime(); $dateStart = new \DateTime();
} }
@ -846,12 +848,9 @@ class ICrmOrderActions
else else
$pr = ''; $pr = '';
if($p['DISCOUNT_VALUE'])
$p['DISCOUNT_PRICE'] = null;
$items[] = array( $items[] = array(
'initialPrice' => (double) $p['PRICE'] + (double) $p['DISCOUNT_PRICE'], 'initialPrice' => (double) $p['PRICE'] + (double) $p['DISCOUNT_PRICE'],
'purchasePrice' => $pr, //'purchasePrice' => $pr,
'discount' => $p['DISCOUNT_PRICE'], 'discount' => $p['DISCOUNT_PRICE'],
'discountPercent' => $p['DISCOUNT_VALUE'], 'discountPercent' => $p['DISCOUNT_VALUE'],
'quantity' => $p['QUANTITY'], 'quantity' => $p['QUANTITY'],