• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Field/Opportunity.php
  • Класс: Bitrix\Crm\Field\Opportunity
  • Вызов: Opportunity::syncOpportunityAccount
private function syncOpportunityAccount(Item $item, float $newOpportunityValue, FieldAfterSaveResult $result): void
{
	if ($item->hasField(Item::FIELD_NAME_OPPORTUNITY_ACCOUNT))
	{
		$opportunityAccount = Currency\Conversion::toAccountCurrency($newOpportunityValue, $item->getCurrencyId());

		$result->setNewValue(Item::FIELD_NAME_OPPORTUNITY_ACCOUNT, $opportunityAccount);
	}
}