diff --git a/src/upload/system/library/retailcrm/RetailcrmHistoryHelper.php b/src/upload/system/library/retailcrm/RetailcrmHistoryHelper.php index 23522d4..8a08e17 100644 --- a/src/upload/system/library/retailcrm/RetailcrmHistoryHelper.php +++ b/src/upload/system/library/retailcrm/RetailcrmHistoryHelper.php @@ -41,15 +41,13 @@ class RetailcrmHistoryHelper { $orders[$change['order']['id']]['items'][$change['item']['id']] = $change['item']; } - if (isset($change['oldValue']) - && empty($change['oldValue']) + if (empty($change['oldValue']) && $change['field'] == 'order_product' ) { $orders[$change['order']['id']]['items'][$change['item']['id']]['create'] = true; } - if (isset($change['newValue']) - && empty($change['newValue']) + if (empty($change['newValue']) && $change['field'] == 'order_product' ) { $orders[$change['order']['id']]['items'][$change['item']['id']]['delete'] = true;