Beispiel #1
0
$APPLICATION->SetAdditionalCSS('/bitrix/components/bitrix/crm.product.section.crumbs/templates/.default/style.css');
$APPLICATION->SetAdditionalCSS('/bitrix/components/bitrix/crm.interface.grid/templates/flat/bitrix/main.interface.grid/.default/style.css');
$APPLICATION->SetAdditionalCSS('/bitrix/components/bitrix/crm.product.search.dialog/templates/.default/bitrix/catalog.product.search/.default/style.css');
$APPLICATION->AddHeadScript('/bitrix/js/crm/crm.js');
$APPLICATION->AddHeadScript('/bitrix/js/main/dd.js');
$bCanAddProduct = $arResult['CAN_ADD_PRODUCT'];
if ($bCanAddProduct) {
    $APPLICATION->AddHeadScript($this->GetFolder() . '/product_create.js');
}
$readOnly = !isset($arResult['READ_ONLY']) || $arResult['READ_ONLY'];
//Only READ_ONLY access by defaul
$bInitEditable = (isset($arResult['INIT_EDITABLE']) ? $arResult['INIT_EDITABLE'] : false) && !$readOnly;
$bHideModeButton = (isset($arResult['HIDE_MODE_BUTTON']) ? $arResult['HIDE_MODE_BUTTON'] : false) || $readOnly;
$enableCustomProducts = $arResult['ENABLE_CUSTOM_PRODUCTS'];
$containerID = $arResult['PREFIX'] . '_container';
$currencyText = CCrmViewHelper::getCurrencyText($arResult['CURRENCY_ID']);
$nProductRows = count($arResult['PRODUCT_ROWS']);
$additionalClasses = $dataTabs = "";
if ($arResult['ALLOW_TAX'] && $arResult['ENABLE_TAX'] && $arResult['ENABLE_DISCOUNT']) {
    $dataTabs = 'all';
    $additionalClasses = " crm-items-list-tax crm-items-list-sale";
} else {
    if ($arResult['ALLOW_TAX'] && $arResult['ENABLE_TAX']) {
        $dataTabs = 'tax';
        $additionalClasses = " crm-items-list-tax";
    } else {
        if ($arResult['ENABLE_DISCOUNT']) {
            $dataTabs = 'sale';
            $additionalClasses = " crm-items-list-sale";
        }
    }