• Модуль: crmmobile
  • Путь к файлу: ~/bitrix/modules/crmmobile/lib/UI/EntityEditor/ProviderDecorator.php
  • Класс: Bitrix\CrmMobile\UI\EntityEditor\ProviderDecorator
  • Вызов: ProviderDecorator::prepareProductRowSummary
private function prepareProductRowSummary(array $values): array
{
	if ($this->factory->isLinkWithProductsEnabled())
	{
		$productRowFieldName = EditorAdapter::FIELD_PRODUCT_ROW_SUMMARY;

		if (
			!isset($values[$productRowFieldName]['totalRaw'])
			|| !is_array($values[$productRowFieldName]['totalRaw'])
		)
		{
			$priceFieldName = $this->getPriceFieldName();
			$currencyFieldName = $this->getCurrencyFieldName();

			$values[$productRowFieldName]['totalRaw'] = [
				'amount' => $values[$priceFieldName] ?? 0,
				'currency' => $values[$currencyFieldName] ?? '',
			];
		}

		if (!isset($values[$productRowFieldName]['count']))
		{
			$values[$productRowFieldName]['count'] = 0;
		}
	}

	return $values;
}