• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/order/tradingplatform/telegram/eventhandler.php
  • Класс: Bitrix\Crm\Order\TradingPlatform\Telegram\EventHandler
  • Вызов: EventHandler::sendShipmentDeductedNotification
static function sendShipmentDeductedNotification(Main\Event $event): void
{
	/** @var Crm\Order\Shipment $shipment */
	$shipment = $event->getParameter('ENTITY');
	if (!$shipment instanceof Crm\Order\Shipment || $shipment->isSystem())
	{
		return;
	}

	$order = $shipment->getOrder();
	if (self::isSetTelegramTradeBinding($order))
	{
		$telegram = new Crm\Integration\ImConnector\Telegram();
		$telegram->sendShipmentDeductedNotification($shipment);
	}
}