1
0
mirror of synced 2025-02-20 17:03:14 +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 (!$update) {
$shipment = $shipmentColl->createItem($delivery);
$shipment->setFields(array(
'BASE_PRICE_DELIVERY' => $orderCrm['delivery']['cost'],
'CURRENCY' => $order->getCurrency(),
'DELIVERY_NAME' => $delivery->getName(),
$shipment->setFields([
'BASE_PRICE_DELIVERY' => $orderCrm['delivery']['cost'],
'PRICE_DELIVERY' => $orderCrm['delivery']['cost'],
'CURRENCY' => $order->getCurrency(),
'DELIVERY_NAME' => $delivery->getName(),
'CUSTOM_PRICE_DELIVERY' => 'Y'
));
]);
} else {
foreach ($shipmentColl as $shipment) {
if (!$shipment->isSystem()) {
$shipment->setFields(array(
'BASE_PRICE_DELIVERY' => $orderCrm['delivery']['cost'],
'CURRENCY' => $order->getCurrency(),
'DELIVERY_ID' => $deliveryId,
'DELIVERY_NAME' => $delivery->getName(),
$shipment->setFields([
'BASE_PRICE_DELIVERY' => $orderCrm['delivery']['cost'],
'PRICE_DELIVERY' => $orderCrm['delivery']['cost'],
'CURRENCY' => $order->getCurrency(),
'DELIVERY_ID' => $deliveryId,
'DELIVERY_NAME' => $delivery->getName(),
'CUSTOM_PRICE_DELIVERY' => 'Y'
));
]);
}
}
}