1
0
mirror of synced 2025-02-21 17:33:15 +03:00

add PRICE_DELIVERY for history exchange

This commit is contained in:
Sergey Chazov 2022-02-03 12:52:00 +04:00
parent a1d6e00d18
commit 34d9d6d576

View File

@ -1625,22 +1625,24 @@ class RetailCrmHistory
if ($delivery) { if ($delivery) {
if (!$update) { if (!$update) {
$shipment = $shipmentColl->createItem($delivery); $shipment = $shipmentColl->createItem($delivery);
$shipment->setFields(array( $shipment->setFields([
'BASE_PRICE_DELIVERY' => $orderCrm['delivery']['cost'], 'BASE_PRICE_DELIVERY' => $orderCrm['delivery']['cost'],
'PRICE_DELIVERY' => $orderCrm['delivery']['cost'],
'CURRENCY' => $order->getCurrency(), 'CURRENCY' => $order->getCurrency(),
'DELIVERY_NAME' => $delivery->getName(), 'DELIVERY_NAME' => $delivery->getName(),
'CUSTOM_PRICE_DELIVERY' => 'Y' 'CUSTOM_PRICE_DELIVERY' => 'Y'
)); ]);
} else { } else {
foreach ($shipmentColl as $shipment) { foreach ($shipmentColl as $shipment) {
if (!$shipment->isSystem()) { if (!$shipment->isSystem()) {
$shipment->setFields(array( $shipment->setFields([
'BASE_PRICE_DELIVERY' => $orderCrm['delivery']['cost'], 'BASE_PRICE_DELIVERY' => $orderCrm['delivery']['cost'],
'PRICE_DELIVERY' => $orderCrm['delivery']['cost'],
'CURRENCY' => $order->getCurrency(), 'CURRENCY' => $order->getCurrency(),
'DELIVERY_ID' => $deliveryId, 'DELIVERY_ID' => $deliveryId,
'DELIVERY_NAME' => $delivery->getName(), 'DELIVERY_NAME' => $delivery->getName(),
'CUSTOM_PRICE_DELIVERY' => 'Y' 'CUSTOM_PRICE_DELIVERY' => 'Y'
)); ]);
} }
} }
} }