1
0
mirror of synced 2024-11-22 05:16:09 +03:00

fixed service bug

This commit is contained in:
Frosin 2019-10-08 16:23:18 +03:00
parent 6fb591c39b
commit 80e9a279f1

View File

@ -1004,11 +1004,14 @@ class RetailCrmHistory
if (isset($orderCrm['delivery']['service']['code'])) {
$deliveryCode = \Bitrix\Sale\Delivery\Services\Manager::getCodeById($deliveryId);
$serviceCode = $orderCrm['delivery']['service']['code'];
$services = \Bitrix\Sale\Delivery\Services\Manager::getService($deliveryId)->getProfilesList();
$service = \Bitrix\Sale\Delivery\Services\Manager::getService($deliveryId);
if (is_object($service)) {
$services = $service->getProfilesList();
if (!array_key_exists($serviceCode, $services)) {
$serviceCode = strtoupper($serviceCode);
$serviceCode = str_replace(array('-'), "_", $serviceCode);
}
}
if ($deliveryCode) {
try {
$deliveryService = \Bitrix\Sale\Delivery\Services\Manager::getObjectByCode($deliveryCode . ':' . $serviceCode);