if ($_POST['action_button_' . $arResult['GRID_ID']] == 'delete' && isset($_POST['ID']) && is_array($_POST['ID'])) { $event = new CCrmInvoiceEvent(); foreach ($_POST['ID'] as $ID) { $event->Delete($ID); } unset($_POST['ID'], $_REQUEST['ID']); // otherwise the filter will work } if (!isset($_POST['AJAX_CALL'])) { LocalRedirect('?' . $arParams['FORM_ID'] . '_active_tab=tab_event'); } } else { if ($_SERVER['REQUEST_METHOD'] == 'GET' && check_bitrix_sessid() && isset($_GET['action_' . $arResult['GRID_ID']])) { if ($_GET['action_' . $arResult['GRID_ID']] == 'delete') { $event = new CCrmInvoiceEvent(); $event->Delete((int) $_GET['ID']); unset($_GET['ID'], $_REQUEST['ID']); // otherwise the filter will work } if (!isset($_GET['AJAX_CALL'])) { LocalRedirect($bInternal ? '?' . $arParams['FORM_ID'] . '_active_tab=' . $arResult['TAB_ID'] : ''); } } } $arResult['FILTER'] = array(); $arResult['FILTER2LOGIC'] = array('EVENT_DESC'); $arResult['FILTER_PRESETS'] = array(); $arResult['EVENT_TYPES'] = CCrmInvoiceEvent::getTypes(); $eventTypeListItems = array('' => '') + $arResult['EVENT_TYPES']; if (!$bInternal) { $arResult['FILTER2LOGIC'] = array('EVENT_DESC');