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