• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/order/productmanager/productconverter/pricesconverter.php
  • Класс: Bitrix\Crm\Order\ProductManager\ProductConverter\PricesConverter
  • Вызов: PricesConverter::convertToSaleBasketPrices
public function convertToSaleBasketPrices(float $price, float $priceExclusive, float $priceNetto, float $priceBrutto, bool $taxIncluded): array
{
	$result = [];

	if ($taxIncluded)
	{
		$result['BASE_PRICE'] = $priceBrutto;
		$result['PRICE'] = $price;
	}
	else
	{
		$result['BASE_PRICE'] = $priceNetto;
		$result['PRICE'] = $priceExclusive;
	}

	$result['DISCOUNT_PRICE'] = PriceMaths::roundPrecision($result['BASE_PRICE'] - $result['PRICE']);

	return $result;
}