From 966406a60918839b78374b6433b71fbb657aa821 Mon Sep 17 00:00:00 2001 From: gorokh Date: Tue, 7 Apr 2020 18:16:09 +0300 Subject: [PATCH] issues #30 removed unnecessary code --- src/Model/History/Exchange.php | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/src/Model/History/Exchange.php b/src/Model/History/Exchange.php index 7f71b35..b6f821d 100644 --- a/src/Model/History/Exchange.php +++ b/src/Model/History/Exchange.php @@ -627,34 +627,6 @@ class Exchange $orders[$change['order']['id']]['order_edit'] = 1; } } else { - if (isset($fields['delivery'][$change['field']]) - && $fields['delivery'][$change['field']] == 'service' - ) { - $orders[$orderId]['delivery']['service']['code'] = self::newValue($change['newValue']); - } elseif (isset($fields['delivery'][$change['field']])) { - $field = $fields['delivery'][$change['field']]; - $orders[$orderId]['delivery'][$field] = self::newValue($change['newValue']); - unset($field); - } elseif (isset($fields['orderAddress'][$change['field']])) { - $field = $fields['orderAddress'][$change['field']]; - $orders[$orderId]['delivery']['address'][$field] = self::newValue($change['newValue']); - unset($field); - } elseif (isset($fields['integrationDelivery'][$change['field']])) { - $field = $fields['integrationDelivery'][$change['field']]; - $orders[$orderId]['delivery']['service'][$field] = self::newValue($change['newValue']); - unset($field); - } elseif (isset($fields['customerContragent'][$change['field']])) { - $field = $fields['customerContragent'][$change['field']]; - $orders[$orderId][$field] = self::newValue($change['newValue']); - unset($field); - } elseif (strripos($change['field'], 'custom_') !== false) { - $field = str_replace('custom_', '', $change['field']); - $orders[$orderId]['customFields'][$field] = self::newValue($change['newValue']); - unset($field); - } elseif (isset($fields['order'][$change['field']])) { - $orders[$orderId][$fields['order'][$change['field']]] = self::newValue($change['newValue']); - } - if (isset($change['created'])) { $orders[$orderId]['create'] = 1; }