• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integration/imconnector/telegram.php
  • Класс: Bitrix\Crm\Integration\ImConnector\Telegram
  • Вызов: Telegram::sendShipmentReadyNotification
public function sendShipmentReadyNotification(Crm\Order\Shipment $shipment): void
{
	$order = $shipment->getOrder();

	$store = Catalog\StoreTable::getById($shipment->getStoreId())->fetch();
	if ($store)
	{
		$message = Main\Localization\Loc::getMessage(
			'CRM_IMCONNECTOR_TELEGRAM_SHIPMENT_READY',
			[
				'#ORDER_ID#' => $order->getField('ACCOUNT_NUMBER'),
				'#DATE#' => $this->getFormattedDate($order->getDateInsert()),
				'#SUM_WITH_CURRENCY#' => $this->getSumWithCurrency($order->getPrice(), $order->getCurrency()),
				'#STORE_ADDRESS#' => $store['ADDRESS'],
			]
		);

		$contact = $this->getPrimaryContact($order);
		if ($contact)
		{
			$this->sendMessage($message, $contact);
		}
	}
}