1
0
mirror of synced 2024-11-22 04:56:07 +03:00

issues #30 removed unnecessary code

This commit is contained in:
gorokh 2020-04-07 18:16:09 +03:00
parent c2c2fa0a95
commit 966406a609

View File

@ -627,34 +627,6 @@ class Exchange
$orders[$change['order']['id']]['order_edit'] = 1; $orders[$change['order']['id']]['order_edit'] = 1;
} }
} else { } 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'])) { if (isset($change['created'])) {
$orders[$orderId]['create'] = 1; $orders[$orderId]['create'] = 1;
} }