17 static public function statusNotify(
Event $event)
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');
34 'ENTITY_TYPE_ID' => Integration\CRM\EntityType::ORDER_SHIPMENT,
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(),
41 static::onReceive($order->getId(), $settings);
44 static public function allowDeliveryNotify(
Event $event)
49 if($shipment->isAllowDelivery())
52 $collection = $shipment->getCollection();
53 $order = $collection->getOrder();
55 if(static::isSync($order) ==
true)
58 'ENTITY_TYPE_ID' => Integration\CRM\EntityType::ORDER_SHIPMENT,
59 'FIELD_NAME' =>
'ALLOW_DELIVERY',
60 'CURRENT_VALUE' =>
'Y',
61 'LEGEND' =>
Loc::getMessage(
'SALE_INTEGRATION_B24_TIMELINE_SHIPMENT_NUMBER').$shipment->getId().
'. '.$shipment->getDeliveryName(),
64 static::onReceive($order->getId(), $settings);
68 static public function deductedNotify(
Event $event)
73 if($shipment->isShipped())
76 $collection = $shipment->getCollection();
77 $order = $collection->getOrder();
80 isSync($order) ==
true)
83 'ENTITY_TYPE_ID' => Integration\CRM\EntityType::ORDER_SHIPMENT,
84 'FIELD_NAME' =>
'DEDUCTED',
85 'CURRENT_VALUE' =>
'Y',
86 'LEGEND' =>
Loc::getMessage(
'SALE_INTEGRATION_B24_TIMELINE_SHIPMENT_NUMBER').$shipment->getId().
'. '.$shipment->getDeliveryName(),
89 static::onReceive($order->getId(), $settings);
static loadMessages($file)
static getMessage($code, $replace=null, $language=null)