• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Service/Factory/SmartInvoice.php
  • Класс: Bitrix\Crm\Service\Factory\SmartInvoice
  • Вызов: SmartInvoice::getEditorAdapter
public function getEditorAdapter(): EditorAdapter
{
	$adapter = parent::getEditorAdapter();

	$locationField = $this->getFieldsCollection()->getField(Item::FIELD_NAME_LOCATION_ID);
	if ($locationField && $locationField->isDisplayed())
	{
		$adapter->addEntityField(EditorAdapter::getLocationFieldDescription($locationField));
	}

	$opportunityField = EditorAdapter::getOpportunityField(
		$this->getFieldCaption(EditorAdapter::FIELD_OPPORTUNITY),
		EditorAdapter::FIELD_OPPORTUNITY,
		$this->isPaymentsEnabled()
	);

	$opportunityField['data']['paymentDocumentsPhrases'] = [
		'CRM_ENTITY_ED_PAYMENT_DOCUMENTS_TITLE_MSGVER_1' => 'CRM_ENTITY_ED_PAYMENT_DOCUMENTS_INVOICE_TITLE_MSGVER_1',
		'CRM_ENTITY_ED_PAYMENT_DOCUMENTS_TOTAL_SUM' => 'CRM_ENTITY_ED_PAYMENT_DOCUMENTS_INVOICE_TOTAL_SUM',
		'CRM_ENTITY_ED_PAYMENT_DOCUMENTS_TOTAL_SUM_TOOLTIP' => 'CRM_ENTITY_ED_PAYMENT_DOCUMENTS_INVOICE_TOTAL_SUM_TOOLTIP',
	];

	$adapter->addEntityField($opportunityField);

	return $adapter;
}