Ejemplo n.º 1
0
 public static function GetDocumentFields($documentType)
 {
     $arDocumentID = self::GetDocumentInfo($documentType . '_0');
     if (empty($arDocumentID)) {
         throw new CBPArgumentNullException('documentId');
     }
     __IncludeLang($_SERVER['DOCUMENT_ROOT'] . BX_ROOT . '/components/bitrix/crm.' . strtolower($arDocumentID['TYPE']) . '.edit/lang/' . LANGUAGE_ID . '/component.php');
     $printableFieldNameSuffix = ' (' . GetMessage('CRM_FIELD_BP_TEXT') . ')';
     $emailFieldNameSuffix = ' (' . GetMessage('CRM_FIELD_BP_EMAIL') . ')';
     $arResult = array('ID' => array('Name' => GetMessage('CRM_FIELD_ID'), 'Type' => 'int', 'Filterable' => true, 'Editable' => false, 'Required' => false), 'TITLE' => array('Name' => GetMessage('CRM_FIELD_TITLE_DEAL'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => true), 'OPPORTUNITY' => array('Name' => GetMessage('CRM_FIELD_OPPORTUNITY'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'CURRENCY_ID' => array('Name' => GetMessage('CRM_FIELD_CURRENCY_ID'), 'Type' => 'select', 'Options' => CCrmCurrencyHelper::PrepareListItems(), 'Filterable' => true, 'Editable' => true, 'Required' => false), 'OPPORTUNITY_ACCOUNT' => array('Name' => GetMessage('CRM_FIELD_OPPORTUNITY_ACCOUNT'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ACCOUNT_CURRENCY_ID' => array('Name' => GetMessage('CRM_FIELD_ACCOUNT_CURRENCY_ID'), 'Type' => 'select', 'Options' => CCrmCurrencyHelper::PrepareListItems(), 'Filterable' => true, 'Editable' => true, 'Required' => false), 'PROBABILITY' => array('Name' => GetMessage('CRM_FIELD_PROBABILITY'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ASSIGNED_BY_ID' => array('Name' => GetMessage('CRM_FIELD_ASSIGNED_BY_ID'), 'Type' => 'user', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ASSIGNED_BY_PRINTABLE' => array('Name' => GetMessage('CRM_FIELD_ASSIGNED_BY_ID') . $printableFieldNameSuffix, 'Type' => 'string', 'Filterable' => false, 'Editable' => false, 'Required' => false), 'ASSIGNED_BY_EMAIL' => array('Name' => GetMessage('CRM_FIELD_ASSIGNED_BY_ID') . $emailFieldNameSuffix, 'Type' => 'string', 'Filterable' => false, 'Editable' => false, 'Required' => false), 'STAGE_ID' => array('Name' => GetMessage('CRM_FIELD_STAGE_ID'), 'Type' => 'select', 'Options' => CCrmStatus::GetStatusListEx('DEAL_STAGE'), 'Filterable' => true, 'Editable' => true, 'Required' => false), 'STAGE_ID_PRINTABLE' => array('Name' => GetMessage('CRM_FIELD_STAGE_ID') . $printableFieldNameSuffix, 'Type' => 'string', 'Filterable' => false, 'Editable' => false, 'Required' => false), 'CLOSED' => array('Name' => GetMessage('CRM_FIELD_CLOSED'), 'Type' => 'bool', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'TYPE_ID' => array('Name' => GetMessage('CRM_FIELD_TYPE_ID'), 'Type' => 'select', 'Options' => CCrmStatus::GetStatusListEx('DEAL_TYPE'), 'Filterable' => true, 'Editable' => true, 'Required' => false), 'COMMENTS' => array('Name' => GetMessage('CRM_FIELD_COMMENTS'), 'Type' => 'text', 'Filterable' => false, 'Editable' => true, 'Required' => false), 'BEGINDATE' => array('Name' => GetMessage('CRM_FIELD_BEGINDATE'), 'Type' => 'datetime', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'CLOSEDATE' => array('Name' => GetMessage('CRM_FIELD_CLOSEDATE'), 'Type' => 'datetime', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'EVENT_DATE' => array('Name' => GetMessage('CRM_FIELD_EVENT_DATE'), 'Type' => 'datetime', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'EVENT_ID' => array('Name' => GetMessage('CRM_FIELD_EVENT_ID'), 'Type' => 'select', 'Options' => CCrmStatus::GetStatusListEx('EVENT_TYPE'), 'Filterable' => true, 'Editable' => true, 'Required' => false), 'EVENT_DESCRIPTION' => array('Name' => GetMessage('CRM_FIELD_EVENT_DESCRIPTION'), 'Type' => 'text', 'Filterable' => false, 'Editable' => true, 'Required' => false), "OPENED" => array("Name" => GetMessage("CRM_FIELD_OPENED"), "Type" => "bool", "Filterable" => true, "Editable" => true, "Required" => false), "LEAD_ID" => array("Name" => GetMessage("CRM_FIELD_LEAD_ID"), "Type" => "int", "Filterable" => true, "Editable" => true, "Required" => false), "ORIGINATOR_ID" => array("Name" => GetMessage("CRM_FIELD_ORIGINATOR_ID"), "Type" => "string", "Filterable" => true, "Editable" => true, "Required" => false), "ORIGIN_ID" => array("Name" => GetMessage("CRM_FIELD_ORIGIN_ID"), "Type" => "string", "Filterable" => true, "Editable" => true, "Required" => false), "CONTACT_ID" => array("Name" => GetMessage("CRM_FIELD_CONTACT_ID"), "Type" => "UF:crm", "Options" => array('CONTACT' => 'Y'), "Filterable" => true, "Editable" => true, "Required" => false, "Multiple" => false), "COMPANY_ID" => array("Name" => GetMessage("CRM_FIELD_COMPANY_ID"), "Type" => "UF:crm", "Options" => array('COMPANY' => 'Y'), "Filterable" => true, "Editable" => true, "Required" => false, "Multiple" => false), "DATE_CREATE" => array("Name" => GetMessage("CRM_DEAL_EDIT_FIELD_DATE_CREATE"), "Type" => "datetime", "Filterable" => true, "Editable" => false, "Required" => false), "DATE_MODIFY" => array("Name" => GetMessage("CRM_DEAL_EDIT_FIELD_DATE_MODIFY"), "Type" => "datetime", "Filterable" => true, "Editable" => false, "Required" => false));
     global $USER_FIELD_MANAGER;
     $CCrmUserType = new CCrmUserType($USER_FIELD_MANAGER, 'CRM_DEAL');
     $CCrmUserType->AddBPFields($arResult, array('PRINTABLE_SUFFIX' => GetMessage("CRM_FIELD_BP_TEXT")));
     return $arResult;
 }
Ejemplo n.º 2
0
 public static function GetDocumentFields($documentType)
 {
     $arDocumentID = self::GetDocumentInfo($documentType . '_0');
     if (empty($arDocumentID)) {
         throw new CBPArgumentNullException('documentId');
     }
     __IncludeLang($_SERVER['DOCUMENT_ROOT'] . BX_ROOT . '/components/bitrix/crm.' . strtolower($arDocumentID['TYPE']) . '.edit/lang/' . LANGUAGE_ID . '/component.php');
     $printableFieldNameSuffix = ' (' . GetMessage('CRM_FIELD_BP_TEXT') . ')';
     $emailFieldNameSuffix = ' (' . GetMessage('CRM_FIELD_BP_EMAIL') . ')';
     $arResult = array('ID' => array('Name' => GetMessage('CRM_FIELD_ID'), 'Type' => 'int', 'Filterable' => true, 'Editable' => false, 'Required' => false), 'TITLE' => array('Name' => GetMessage('CRM_FIELD_TITLE'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => true), 'COMPANY_TYPE' => array('Name' => GetMessage('CRM_FIELD_COMPANY_TYPE'), 'Type' => 'select', 'Options' => CCrmStatus::GetStatusListEx('COMPANY_TYPE'), 'Filterable' => true, 'Editable' => true, 'Required' => false), 'INDUSTRY' => array('Name' => GetMessage('CRM_FIELD_INDUSTRY'), 'Type' => 'select', 'Options' => CCrmStatus::GetStatusListEx('INDUSTRY'), 'Filterable' => true, 'Editable' => true, 'Required' => false), 'EMPLOYEES' => array('Name' => GetMessage('CRM_FIELD_EMPLOYEES'), 'Type' => 'select', 'Options' => CCrmStatus::GetStatusListEx('EMPLOYEES'), 'Filterable' => true, 'Editable' => true, 'Required' => false), 'REVENUE' => array('Name' => GetMessage('CRM_FIELD_REVENUE'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'CURRENCY_ID' => array('Name' => GetMessage('CRM_FIELD_CURRENCY_ID'), 'Type' => 'select', 'Options' => CCrmCurrencyHelper::PrepareListItems(), 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ASSIGNED_BY_ID' => array('Name' => GetMessage('CRM_FIELD_ASSIGNED_BY_ID'), 'Type' => 'user', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ASSIGNED_BY_PRINTABLE' => array('Name' => GetMessage('CRM_FIELD_ASSIGNED_BY_ID') . $printableFieldNameSuffix, 'Type' => 'string', 'Filterable' => false, 'Editable' => false, 'Required' => false), 'ASSIGNED_BY_EMAIL' => array('Name' => GetMessage('CRM_FIELD_ASSIGNED_BY_ID') . $emailFieldNameSuffix, 'Type' => 'string', 'Filterable' => false, 'Editable' => false, 'Required' => false), 'COMMENTS' => array('Name' => GetMessage('CRM_FIELD_COMMENTS'), 'Type' => 'text', 'Filterable' => false, 'Editable' => true, 'Required' => false), 'EMAIL' => array('Name' => GetMessage('CRM_FIELD_EMAIL'), 'Type' => 'email', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'PHONE' => array('Name' => GetMessage('CRM_FIELD_PHONE'), 'Type' => 'phone', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'WEB' => array('Name' => GetMessage('CRM_FIELD_WEB'), 'Type' => 'web', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'IM' => array('Name' => GetMessage('CRM_FIELD_MESSENGER'), 'Type' => 'im', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ADDRESS' => array('Name' => GetMessage('CRM_FIELD_ADDRESS'), 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ADDRESS_LEGAL' => array('Name' => GetMessage('CRM_FIELD_ADDRESS_LEGAL'), 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'BANKING_DETAILS' => array('Name' => GetMessage('CRM_FIELD_BANKING_DETAILS'), 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), "OPENED" => array("Name" => GetMessage("CRM_FIELD_OPENED"), "Type" => "bool", "Filterable" => true, "Editable" => true, "Required" => false), "LEAD_ID" => array("Name" => GetMessage("CRM_FIELD_LEAD_ID"), "Type" => "int", "Filterable" => true, "Editable" => true, "Required" => false), "ORIGINATOR_ID" => array("Name" => GetMessage("CRM_FIELD_ORIGINATOR_ID"), "Type" => "string", "Filterable" => true, "Editable" => true, "Required" => false), "ORIGIN_ID" => array("Name" => GetMessage("CRM_FIELD_ORIGIN_ID"), "Type" => "string", "Filterable" => true, "Editable" => true, "Required" => false), "CONTACT_ID" => array("Name" => GetMessage("CRM_FIELD_CONTACT_ID"), "Type" => "UF:crm", "Options" => array('CONTACT' => 'Y'), "Filterable" => true, "Editable" => true, "Required" => false, "Multiple" => false), "DATE_CREATE" => array("Name" => GetMessage("CRM_COMPANY_EDIT_FIELD_DATE_CREATE"), "Type" => "datetime", "Filterable" => true, "Editable" => false, "Required" => false), "DATE_MODIFY" => array("Name" => GetMessage("CRM_COMPANY_EDIT_FIELD_DATE_MODIFY"), "Type" => "datetime", "Filterable" => true, "Editable" => false, "Required" => false));
     $ar = CCrmFieldMulti::GetEntityTypeList();
     foreach ($ar as $typeId => $arFields) {
         $arResult[$typeId . '_PRINTABLE'] = array('Name' => GetMessage("CRM_FIELD_MULTI_" . $typeId) . $printableFieldNameSuffix, 'Type' => 'string', "Filterable" => true, "Editable" => false, "Required" => false);
         foreach ($arFields as $valueType => $valueName) {
             $arResult[$typeId . '_' . $valueType] = array('Name' => $valueName, 'Type' => 'string', "Filterable" => true, "Editable" => false, "Required" => false);
             $arResult[$typeId . '_' . $valueType . '_PRINTABLE'] = array('Name' => $valueName . $printableFieldNameSuffix, 'Type' => 'string', "Filterable" => true, "Editable" => false, "Required" => false);
         }
     }
     global $USER_FIELD_MANAGER;
     $CCrmUserType = new CCrmUserType($USER_FIELD_MANAGER, 'CRM_COMPANY');
     $CCrmUserType->AddBPFields($arResult, array('PRINTABLE_SUFFIX' => GetMessage("CRM_FIELD_BP_TEXT")));
     return $arResult;
 }
Ejemplo n.º 3
0
 public static function GetDocumentFields($documentType)
 {
     $arDocumentID = self::GetDocumentInfo($documentType . '_0');
     if (empty($arDocumentID)) {
         throw new CBPArgumentNullException('documentId');
     }
     __IncludeLang($_SERVER['DOCUMENT_ROOT'] . BX_ROOT . '/components/bitrix/crm.' . strtolower($arDocumentID['TYPE']) . '.edit/lang/' . LANGUAGE_ID . '/component.php');
     $addressLabels = Bitrix\Crm\EntityAddress::getShortLabels();
     $printableFieldNameSuffix = ' (' . GetMessage('CRM_FIELD_BP_TEXT') . ')';
     $emailFieldNameSuffix = ' (' . GetMessage('CRM_FIELD_BP_EMAIL') . ')';
     $arResult = array('ID' => array('Name' => GetMessage('CRM_FIELD_ID'), 'Type' => 'int', 'Filterable' => true, 'Editable' => false, 'Required' => false), 'TITLE' => array('Name' => GetMessage('CRM_FIELD_TITLE'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => true), 'STATUS_ID' => array('Name' => GetMessage('CRM_FIELD_STATUS_ID'), 'Type' => 'select', 'Options' => CCrmStatus::GetStatusListEx('STATUS'), 'Filterable' => true, 'Editable' => true, 'Required' => false), 'STATUS_ID_PRINTABLE' => array('Name' => GetMessage('CRM_FIELD_STATUS_ID') . $printableFieldNameSuffix, 'Type' => 'string', 'Filterable' => false, 'Editable' => false, 'Required' => false), 'STATUS_DESCRIPTION' => array('Name' => GetMessage('CRM_FIELD_STATUS_DESCRIPTION'), 'Type' => 'text', 'Filterable' => false, 'Editable' => true, 'Required' => false), 'OPPORTUNITY' => array('Name' => GetMessage('CRM_FIELD_OPPORTUNITY'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'CURRENCY_ID' => array('Name' => GetMessage('CRM_FIELD_CURRENCY_ID'), 'Type' => 'select', 'Options' => CCrmCurrencyHelper::PrepareListItems(), 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ASSIGNED_BY_ID' => array('Name' => GetMessage('CRM_FIELD_ASSIGNED_BY_ID'), 'Type' => 'user', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ASSIGNED_BY_PRINTABLE' => array('Name' => GetMessage('CRM_FIELD_ASSIGNED_BY_ID') . $printableFieldNameSuffix, 'Type' => 'string', 'Filterable' => false, 'Editable' => false, 'Required' => false), 'ASSIGNED_BY_EMAIL' => array('Name' => GetMessage('CRM_FIELD_ASSIGNED_BY_ID') . $emailFieldNameSuffix, 'Type' => 'string', 'Filterable' => false, 'Editable' => false, 'Required' => false), 'CREATED_BY_ID' => array('Name' => GetMessage('CRM_FIELD_CREATED_BY_ID'), 'Type' => 'user', 'Filterable' => true, 'Editable' => false, 'Required' => false), 'CREATED_BY_PRINTABLE' => array('Name' => GetMessage('CRM_FIELD_CREATED_BY_ID') . $printableFieldNameSuffix, 'Type' => 'string', 'Filterable' => false, 'Editable' => false, 'Required' => false), 'COMMENTS' => array('Name' => GetMessage('CRM_FIELD_COMMENTS'), 'Type' => 'text', 'Filterable' => false, 'Editable' => true, 'Required' => false), 'NAME' => array('Name' => GetMessage('CRM_FIELD_NAME'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'LAST_NAME' => array('Name' => GetMessage('CRM_FIELD_LAST_NAME'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'SECOND_NAME' => array('Name' => GetMessage('CRM_FIELD_SECOND_NAME'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'BIRTHDATE' => array('Name' => GetMessage('CRM_LEAD_EDIT_FIELD_BIRTHDATE'), 'Type' => 'datetime', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'EMAIL' => array('Name' => GetMessage('CRM_FIELD_EMAIL'), 'Type' => 'email', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'PHONE' => array('Name' => GetMessage('CRM_FIELD_PHONE'), 'Type' => 'phone', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'WEB' => array('Name' => GetMessage('CRM_FIELD_WEB'), 'Type' => 'web', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'IM' => array('Name' => GetMessage('CRM_FIELD_MESSENGER'), 'Type' => 'im', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'COMPANY_TITLE' => array('Name' => GetMessage('CRM_FIELD_COMPANY_TITLE'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'POST' => array('Name' => GetMessage('CRM_FIELD_POST'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'FULL_ADDRESS' => array('Name' => GetMessage('CRM_FIELD_ADDRESS'), 'Type' => 'text', 'Filterable' => false, 'Editable' => false, 'Required' => false), 'ADDRESS' => array('Name' => $addressLabels['ADDRESS'], 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ADDRESS_2' => array('Name' => $addressLabels['ADDRESS_2'], 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ADDRESS_CITY' => array('Name' => $addressLabels['CITY'], 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ADDRESS_POSTAL_CODE' => array('Name' => $addressLabels['POSTAL_CODE'], 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ADDRESS_REGION' => array('Name' => $addressLabels['REGION'], 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ADDRESS_PROVINCE' => array('Name' => $addressLabels['PROVINCE'], 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ADDRESS_COUNTRY' => array('Name' => $addressLabels['COUNTRY'], 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'SOURCE_ID' => array('Name' => GetMessage('CRM_FIELD_SOURCE_ID'), 'Type' => 'select', 'Options' => CCrmStatus::GetStatusListEx('SOURCE'), 'Filterable' => true, 'Editable' => true, 'Required' => false), 'SOURCE_DESCRIPTION' => array('Name' => GetMessage('CRM_FIELD_SOURCE_DESCRIPTION'), 'Type' => 'text', 'Filterable' => false, 'Editable' => true, 'Required' => false), "DATE_CREATE" => array("Name" => GetMessage("CRM_LEAD_EDIT_FIELD_DATE_CREATE"), "Type" => "datetime", "Filterable" => true, "Editable" => false, "Required" => false), "DATE_MODIFY" => array("Name" => GetMessage("CRM_LEAD_EDIT_FIELD_DATE_MODIFY"), "Type" => "datetime", "Filterable" => true, "Editable" => false, "Required" => false));
     $ar = CCrmFieldMulti::GetEntityTypeList();
     foreach ($ar as $typeId => $arFields) {
         $arResult[$typeId . '_PRINTABLE'] = array('Name' => GetMessage('CRM_FIELD_MULTI_' . $typeId) . $printableFieldNameSuffix, 'Type' => 'string', "Filterable" => true, "Editable" => false, "Required" => false);
         foreach ($arFields as $valueType => $valueName) {
             $arResult[$typeId . '_' . $valueType] = array('Name' => $valueName, 'Type' => 'string', "Filterable" => true, "Editable" => false, "Required" => false);
             $arResult[$typeId . '_' . $valueType . '_PRINTABLE'] = array('Name' => $valueName . $printableFieldNameSuffix, 'Type' => 'string', "Filterable" => true, "Editable" => false, "Required" => false);
         }
     }
     global $USER_FIELD_MANAGER;
     $CCrmUserType = new CCrmUserType($USER_FIELD_MANAGER, 'CRM_LEAD');
     $CCrmUserType->AddBPFields($arResult, array('PRINTABLE_SUFFIX' => GetMessage("CRM_FIELD_BP_TEXT")));
     return $arResult;
 }