<tr class="adm-detail-required-field"> <td width="40%" valign="top"><?php echo GetMessage("F_LOCATION2"); ?> :</td> <td width="60%" valign="top"> <select name="LOCATION2[]" size="5" multiple> <?php $db_vars = CSaleLocationGroup::GetList(array("NAME" => "ASC"), array(), LANG); ?> <?php $arLOCATION2 = array(); if ($bInitVars) { $arLOCATION2 = $LOCATION2; } else { $db_location = CSaleTaxRate::GetLocationList(array("TAX_RATE_ID" => $ID, "LOCATION_TYPE" => "G")); while ($arLocation = $db_location->Fetch()) { $arLOCATION2[] = $arLocation["LOCATION_ID"]; } } if (!is_array($arLOCATION2)) { $arLOCATION2 = array(); } ?> <?php while ($vars = $db_vars->Fetch()) { ?> <option value="<?php echo $vars["ID"]; ?> "<?php
$arResult['VALUE'] = isset($arTaxRate['VALUE']) ? strval($arTaxRate['VALUE']) : ''; $arResult['IS_IN_PRICE'] = isset($arTaxRate['IS_IN_PRICE']) && $arTaxRate['IS_IN_PRICE'] == 'Y' ? true : false; $arResult['APPLY_ORDER'] = isset($arTaxRate['APPLY_ORDER']) ? intval($arTaxRate['APPLY_ORDER']) : 100; $arTax = CCrmTax::GetById($arResult['TAX_ID']); $arResult['TAX_NAME'] = htmlspecialcharsbx($arTax['NAME']); $arLOCATION1 = array(); if ($lpEnabled) { $arResult['LOCATION1'] = array(); $arResult['LOCATION1_LIST'] = array(); if (isset($_POST['LOCATION1']) || isset($_POST['LOCATION2'])) { $arResult['LOCATION_QUERY'] = array('L' => isset($LOCATION1) ? $LOCATION1 : array(), 'G' => isset($LOCATION2) ? $LOCATION2 : array()); } else { $arResult['LOCATION_QUERY'] = false; } } else { $db_location = CSaleTaxRate::GetLocationList(array("TAX_RATE_ID" => $arResult['ID'], "LOCATION_TYPE" => "L")); while ($arLocation = $db_location->Fetch()) { $arLOCATION1[] = $arLocation["LOCATION_ID"]; } if (!is_array($arLOCATION1)) { $arLOCATION1 = array(); } $arResult['LOCATION1'] = $arLOCATION1; $arLocationsList = array(); $dbLocList = CSaleLocation::GetList(array("SORT" => "ASC", "COUNTRY_NAME_LANG" => "ASC", "COUNTRY_NAME_ORIG" => "ASC", "REGION_NAME_LANG" => "ASC", "REGION_NAME_ORIG" => "ASC", "CITY_NAME_LANG" => "ASC", "CITY_NAME_ORIG" => "ASC"), array("LID" => LANGUAGE_ID)); while ($arLoc = $dbLocList->Fetch()) { $arLocationsList[$arLoc['ID']] = array(); //$arLoc; if (in_array(intval($arLoc['ID']), $arResult['LOCATION1'])) { $arLocationsList[$arLoc['ID']]['SELECTED'] = true; } else {