ProductsDataProvider::prepareTransactionData

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. ProductsDataProvider
  4. prepareTransactionData
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integration/documentgenerator/dataprovider/productsdataprovider.php
  • Класс: Bitrix\Crm\Integration\DocumentGenerator\DataProvider\ProductsDataProvider
  • Вызов: ProductsDataProvider::prepareTransactionData
public function prepareTransactionData(): Barcode\Payment\TransactionData
{
	$transactionData = parent::prepareTransactionData();

	$sum = $this->getRawValue('TOTAL_SUM');
	$optionValues = $this->getOptions()['VALUES'] ?? [];
	$templatePlaceholder = DataProviderManager::getInstance()->valueToPlaceholder('TOTAL_SUM');
	if (isset($optionValues[$templatePlaceholder]))
	{
		$sum = $optionValues[$templatePlaceholder];
	}

	if (is_numeric($sum))
	{
		$transactionData->setSum((float)$sum);
	}

	return $transactionData;
}

Добавить комментарий