public function checkByShipment(\Bitrix\Sale\Shipment $shipment, array $restrictionParams, $deliveryId = 0) { if (empty($restrictionParams)) { return true; } $result = true; if (!($itemCollection = $shipment->getShipmentItemCollection())) { throw new SystemException("Cant get ShipmentItemCollection"); } $shipmentPrice = $itemCollection->getPrice(); if (\Bitrix\Main\Loader::includeModule('currency')) { $shipmentPrice = \CCurrencyRates::convertCurrency($shipmentPrice, $shipment->getCurrency(), $restrictionParams["CURRENCY"]); } if ($shipmentPrice >= 0) { $result = $this->check($shipmentPrice, $restrictionParams, $deliveryId); } return $result; }