• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/entity/paymentdocumentsrepository.php
  • Класс: Bitrix\Crm\Entity\objects
  • Вызов: objects::fetchShipmentDocuments
private function fetchShipmentDocuments(array $shipments): array
{
	$result = [];

	foreach ($shipments as $shipment)
	{
		$isEmptyDeliveryService = (
			$shipment['DELIVERY_CLASS_NAME'] === '\\' . Sale\Delivery\Services\EmptyDeliveryService::class
			|| is_subclass_of($shipment['DELIVERY_CLASS_NAME'], Sale\Delivery\Services\EmptyDeliveryService::class)
		);

		if ($isEmptyDeliveryService)
		{
			continue;
		}

		$shipment['TYPE'] = 'SHIPMENT';
		$shipment['ORIG_SUM'] = $shipment['PRICE_DELIVERY'];
		$shipment['ORIG_CURRENCY'] = $shipment['CURRENCY'];
		$shipment['SUM'] = $shipment['PRICE_DELIVERY'];
		$shipment['DATE'] = $shipment['DATE_INSERT'];

		$result[] = $shipment;
	}

	return $result;
}