discount fix
This commit is contained in:
parent
63d03327f3
commit
344a952f99
@ -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'],
|
||||
|
Loading…
Reference in New Issue
Block a user