...Человеческий поиск в разработке...
- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_document_deal.php
- Класс: \CCrmDocumentDeal
- Вызов: CCrmDocumentDeal::getEntityFields
static function getEntityFields($entityType) { \Bitrix\Main\Localization\Loc::loadMessages($_SERVER['DOCUMENT_ROOT'].BX_ROOT.'/components/bitrix/crm.'. mb_strtolower($entityType).'.edit/component.php'); $printableFieldNameSuffix = ' (' . GetMessage('CRM_FIELD_BP_TEXT') . ')'; $arResult = static::getVirtualFields() + [ 'ID' => [ 'Name' => GetMessage('CRM_FIELD_ID'), 'Type' => 'int', 'Filterable' => true, 'Editable' => false, 'Required' => false, ], 'TITLE' =>[ 'Name' => GetMessage('CRM_FIELD_TITLE_DEAL'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => true, ], 'OPPORTUNITY' => [ 'Name' => GetMessage('CRM_FIELD_OPPORTUNITY'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => false, ], 'CURRENCY_ID' => [ 'Name' => GetMessage('CRM_FIELD_CURRENCY_ID'), 'Type' => 'select', 'Options' => CCrmCurrencyHelper::PrepareListItems(), 'Filterable' => true, 'Editable' => true, 'Required' => false, ], 'OPPORTUNITY_ACCOUNT' => [ 'Name' => GetMessage('CRM_FIELD_OPPORTUNITY_ACCOUNT'), 'Type' => 'string', 'Filterable' => true, 'Editable' => false, 'Required' => false, ], 'ACCOUNT_CURRENCY_ID' => [ 'Name' => GetMessage('CRM_FIELD_ACCOUNT_CURRENCY_ID'), 'Type' => 'select', 'Options' => CCrmCurrencyHelper::PrepareListItems(), 'Filterable' => true, 'Editable' => true, 'Required' => false, ], 'PROBABILITY' => [ 'Name' => GetMessage('CRM_FIELD_PROBABILITY'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => false, ], 'ASSIGNED_BY_ID' => [ 'Name' => GetMessage('CRM_FIELD_ASSIGNED_BY_ID'), 'Type' => 'user', 'Filterable' => true, 'Editable' => true, 'Required' => false, ], ]; $arResult += parent::getAssignedByFields(); $arResult += [ 'CREATED_BY_ID' => [ 'Name' => GetMessage('CRM_DOCUMENT_FIELD_CREATED_BY_ID_DEAL'), 'Type' => 'user', ], 'MODIFY_BY_ID' => [ 'Name' => GetMessage('CRM_DOCUMENT_FIELD_MODIFY_BY_ID'), 'Type' => 'user', ], 'CATEGORY_ID' => [ 'Name' => GetMessage('CRM_FIELD_CATEGORY_ID'), 'Type' => 'select', 'Options' => DealCategory::getSelectListItems(true), 'Filterable' => true, 'Editable' => true, 'Required' => false ], 'CATEGORY_ID_PRINTABLE' => [ 'Name' => GetMessage('CRM_FIELD_CATEGORY_ID').$printableFieldNameSuffix, 'Type' => 'string', 'Filterable' => false, 'Editable' => false, 'Required' => false, ], 'STAGE_ID' => [ 'Name' => GetMessage('CRM_FIELD_STAGE_ID'), 'Type' => 'select', 'Options' => DealCategory::getFullStageList(), 'Filterable' => true, 'Editable' => true, 'Required' => false, 'Settings' => array('Groups' => DealCategory::getStageGroupInfos()) ], 'STAGE_ID_PRINTABLE' => [ 'Name' => GetMessage('CRM_FIELD_STAGE_ID').$printableFieldNameSuffix, 'Type' => 'string', 'Filterable' => false, 'Editable' => false, 'Required' => false, ], 'CLOSED' => [ 'Name' => GetMessage('CRM_FIELD_CLOSED'), 'Type' => 'bool', 'Filterable' => true, 'Editable' => true, 'Required' => false, ], 'TYPE_ID' => [ 'Name' => GetMessage('CRM_DOCUMENT_DEAL_TYPE_ID'), 'Type' => 'select', 'Options' => CCrmStatus::GetStatusListEx('DEAL_TYPE'), 'Filterable' => true, 'Editable' => true, 'Required' => false, ], 'COMMENTS' => [ 'Name' => GetMessage('CRM_FIELD_COMMENTS'), 'Type' => 'text', 'ValueContentType' => 'bb', 'Filterable' => false, 'Editable' => true, 'Required' => false, ], 'BEGINDATE' => [ 'Name' => GetMessage('CRM_FIELD_BEGINDATE'), 'Type' => 'date', 'Filterable' => true, 'Editable' => true, 'Required' => false, ], 'CLOSEDATE' => [ 'Name' => GetMessage('CRM_FIELD_CLOSEDATE'), 'Type' => 'datetime', 'Filterable' => true, 'Editable' => true, 'Required' => false, ], 'EVENT_DATE' => [ 'Name' => GetMessage('CRM_FIELD_EVENT_DATE'), 'Type' => 'datetime', 'Filterable' => true, 'Editable' => true, 'Required' => false, ], 'EVENT_ID' => [ 'Name' => GetMessage('CRM_FIELD_EVENT_ID'), 'Type' => 'select', 'Options' => CCrmStatus::GetStatusListEx('EVENT_TYPE'), 'Filterable' => true, 'Editable' => true, 'Required' => false, ], 'EVENT_DESCRIPTION' => [ 'Name' => GetMessage('CRM_FIELD_EVENT_DESCRIPTION'), 'Type' => 'text', 'Filterable' => false, 'Editable' => true, 'Required' => false, ], "OPENED" => [ "Name" => GetMessage("CRM_FIELD_OPENED"), "Type" => "bool", "Filterable" => true, "Editable" => true, "Required" => false, ], "LEAD_ID" => [ "Name" => GetMessage("CRM_FIELD_LEAD_ID"), "Type" => "int", "Filterable" => true, "Editable" => true, "Required" => false, ], "ORIGINATOR_ID" => [ "Name" => GetMessage("CRM_FIELD_ORIGINATOR_ID"), "Type" => "string", "Filterable" => true, "Editable" => true, "Required" => false, ], "ORIGIN_ID" => [ "Name" => GetMessage("CRM_FIELD_ORIGIN_ID"), "Type" => "string", "Filterable" => true, "Editable" => true, "Required" => false, ], "CONTACT_ID" => [ "Name" => GetMessage("CRM_FIELD_CONTACT_ID"), "Type" => "UF:crm", "Options" => array('CONTACT' => 'Y'), "Filterable" => true, "Editable" => true, "Required" => false, "Multiple" => false, ], "CONTACT_IDS" => [ "Name" => GetMessage("CRM_FIELD_CONTACT_IDS"), "Type" => "string", "Filterable" => true, "Editable" => true, "Required" => false, "Multiple" => true, ], "OBSERVER_IDS" => [ "Name" => GetMessage("CRM_FIELD_OBSERVER_IDS"), "Type" => "user", "Filterable" => true, "Editable" => false, "Required" => false, "Multiple" => true, 'Default' => [], ], "COMPANY_ID" => [ "Name" => GetMessage("CRM_FIELD_COMPANY_ID"), "Type" => "UF:crm", "Options" => array('COMPANY' => 'Y'), "Filterable" => true, "Editable" => true, "Required" => false, "Multiple" => false, ], 'SOURCE_ID' => [ 'Name' => GetMessage('CRM_DOCUMENT_FIELD_SOURCE_ID'), 'Type' => 'select', 'Options' => CCrmStatus::GetStatusListEx('SOURCE'), 'Filterable' => true, 'Editable' => true, 'Required' => false, ], 'SOURCE_DESCRIPTION' => [ 'Name' => GetMessage('CRM_DOCUMENT_FIELD_SOURCE_DESCRIPTION'), 'Type' => 'text', 'Filterable' => false, 'Editable' => true, 'Required' => false, ], "DATE_CREATE" => [ "Name" => GetMessage("CRM_DEAL_EDIT_FIELD_DATE_CREATE"), "Type" => "datetime", "Filterable" => true, "Editable" => false, "Required" => false, ], "DATE_MODIFY" => [ "Name" => GetMessage("CRM_DEAL_EDIT_FIELD_DATE_MODIFY"), "Type" => "datetime", "Filterable" => true, "Editable" => false, "Required" => false, ], 'WEBFORM_ID' => [ 'Name' => GetMessage('CRM_DOCUMENT_WEBFORM_ID'), 'Type' => 'select', 'Options' => static::getWebFormSelectOptions(), 'Filterable' => false, 'Editable' => false, 'Required' => false, ], 'IS_RETURN_CUSTOMER' => [ 'Name' => GetMessage('CRM_DOCUMENT_DEAL_IS_RETURN_CUSTOMER'), 'Type' => 'bool', 'Editable' => false, ], "ORDER_IDS" => [ "Name" => GetMessage("CRM_FIELD_ORDER_IDS"), "Type" => "int", "Multiple" => true, ], 'IS_REPEATED_APPROACH' => [ 'Name' => GetMessage('CRM_DOCUMENT_DEAL_IS_REPEATED_APPROACH'), 'Type' => 'bool', 'Editable' => false, ], "PRODUCT_IDS" => [ "Name" => GetMessage("CRM_DOCUMENT_FIELD_PRODUCT_IDS"), "Type" => "int", "Multiple" => true, ], "PRODUCT_IDS_PRINTABLE" => [ "Name" => GetMessage("CRM_DOCUMENT_FIELD_PRODUCT_IDS") . $printableFieldNameSuffix, "Type" => "text", ], 'TRACKING_SOURCE_ID' => [ 'Name' => GetMessage('CRM_DOCUMENT_FIELD_TRACKING_SOURCE_ID'), 'Type' => 'select', 'Options' => array_column(Crm\Tracking\Provider::getActualSources(), 'NAME','ID'), 'Filterable' => true, 'Editable' => true, 'Required' => false, ], ]; $arResult += static::getCommunicationFields(); global $USER_FIELD_MANAGER; $CCrmUserType = new CCrmUserType($USER_FIELD_MANAGER, 'CRM_DEAL'); $CCrmUserType->AddBPFields($arResult, array('PRINTABLE_SUFFIX' => GetMessage("CRM_FIELD_BP_TEXT"))); //append UTM fields $arResult += parent::getUtmFields(); //append FORM fields $arResult += parent::getSiteFormFields(CCrmOwnerType::Deal); return $arResult; }