20 $shipment =
$event->getParameters()[
'ENTITY'];
23 $collection = $shipment->getCollection();
24 $order = $collection->getOrder();
26 if(static::isSync(
$order) ==
true)
28 $idOld = $shipment->getFields()->getOriginalValues()[
'STATUS_ID'] ??
'';
30 $id = $shipment->getField(
'STATUS_ID');
35 'FIELD_NAME' =>
'STATUS_ID',
36 'CURRENT_VALUE' =>
$name,
37 'PREVIOUS_VALUE' => $nameOld,
38 'LEGEND' => Loc::getMessage(
'SALE_INTEGRATION_B24_TIMELINE_SHIPMENT_NUMBER').$shipment->getId().
'. '.$shipment->getDeliveryName(),
44 static public function allowDeliveryNotify(
Event $event)
47 $shipment =
$event->getParameters()[
'ENTITY'];
49 if($shipment->isAllowDelivery())
52 $collection = $shipment->getCollection();
53 $order = $collection->getOrder();
55 if(static::isSync(
$order) ==
true)
59 'FIELD_NAME' =>
'ALLOW_DELIVERY',
60 'CURRENT_VALUE' =>
'Y',
61 'LEGEND' => Loc::getMessage(
'SALE_INTEGRATION_B24_TIMELINE_SHIPMENT_NUMBER').$shipment->getId().
'. '.$shipment->getDeliveryName(),
71 $shipment =
$event->getParameters()[
'ENTITY'];
73 if($shipment->isShipped())
76 $collection = $shipment->getCollection();
77 $order = $collection->getOrder();
84 'FIELD_NAME' =>
'DEDUCTED',
85 'CURRENT_VALUE' =>
'Y',
86 'LEGEND' => Loc::getMessage(
'SALE_INTEGRATION_B24_TIMELINE_SHIPMENT_NUMBER').$shipment->getId().
'. '.$shipment->getDeliveryName(),