CBaseSaleReportHelper::setSelectedCurrency($reportCurrencyId); $reportCurrency = CCurrencyLang::GetById($reportCurrencyId, LANGUAGE_ID); $reportWeightUnits = CBaseSaleReportHelper::getDefaultSiteWeightUnits(); $arParams['REPORT_CURRENCY_LABEL_TEXT'] = GetMessage('SALE_REPORT_VIEW_CURRENCY_LABEL_TITLE') . ': ' . $reportCurrency['FULL_NAME']; $arParams['REPORT_WEIGHT_UNITS_LABEL_TEXT'] = GetMessage('SALE_REPORT_VIEW_WEIGHT_UNITS_LABEL_TITLE') . ': ' . $reportWeightUnits; // Beforehand we get report parameters. $arRepParams = array(); if (!($arRepParams = Bitrix\Report\ReportTable::getById($ID)->fetch())) { $errorMessage .= GetMessage("SALE_REPORT_VIEW_ERROR_GET_REP_PARAMS") . '<br>'; $fCriticalError = true; } } if (!$fCriticalError) { // get helper name $arParams['OWNER_ID'] = $arRepParams['OWNER_ID']; $arParams['REPORT_HELPER_CLASS'] = CBaseSaleReportHelper::getHelperByOwner($arRepParams['OWNER_ID']); // fill report title $arParams['TITLE'] = $arRepParams['TITLE']; } if (!$fCriticalError) { // helper specific filters if ($arParams['OWNER_ID'] === 'sale_SaleProduct') { // Product custom filter (set value to helper) if (!empty($arParams['F_SALE_PRODUCT'])) { call_user_func(array($arParams['REPORT_HELPER_CLASS'], 'setCustomProductFilter'), $arParams['F_SALE_PRODUCT']); } // Product custom "types of prices" filter (set report setting to helper) $arRepSetting = unserialize($arRepParams['SETTINGS']); if ($arRepSetting['helper_spec']['ucspt'] === true) { call_user_func(array($arParams['REPORT_HELPER_CLASS'], 'enablePriceTypesColumns'), true); }