- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/lib/Service/Accounting.php
- Класс: Bitrix\Crm\Service\Accounting
- Вызов: Accounting::calculate
public function calculate(
array $productRows,
string $currencyId,
int $personTypeId,
?string $locationId = null
): ?array
{
$options = [
'ALLOW_LD_TAX' => 'N',
];
if ($this->isTaxMode())
{
$options['ALLOW_LD_TAX'] = 'Y';
if (!empty($locationId))
{
$options['LOCATION_ID'] = $locationId;
}
}
return \CCrmSaleHelper::Calculate(
$productRows,
$currencyId,
$personTypeId,
false,
SITE_ID,
$options
);
}