Bitrix-D7  20.0.0
Класс BusinessValueConsumer1C

Открытые статические члены

static & getConsumers ()
 
static getRekvCodeKey ($personTypeId, $codeIndex)
 
static sanitizeMapping ($codeKey, $personTypeId, array &$mapping)
 
static setMapping ($codeKey, $personTypeId, array $mapping)
 
static renderColumns ($codeKey, $personTypeId, array $mappings, $inputNamePrefix)
 
static getJavaScript ()
 

Поля данных

const CONSUMER_KEY = '1C'
 

Статические открытые данные

static $personMaxIndex
 

Подробное описание

См. определение в файле businessvalue.php строка 1198

Методы

◆ getConsumers()

static& getConsumers ( )
static

См. определение в файле businessvalue.php строка 1208

1209  {
1210  static $consumers;
1211  if (! $consumers)
1212  {
1213  self::$codes = array(
1214  // !!! Make sure these codes are in sync with system codes in CSaleExport !!!
1215  'BUYER_PERSON_NAME' => array('NAME' => Loc::getMessage('BIZVAL_CODE_NAME' ), 'SORT' => 100, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1216  'BUYER_PERSON_NAME_FIRST' => array('NAME' => Loc::getMessage('BIZVAL_CODE_FIRST_NAME' ), 'SORT' => 200, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1217  'BUYER_PERSON_NAME_SECOND' => array('NAME' => Loc::getMessage('BIZVAL_CODE_SECOND_NAME' ), 'SORT' => 300, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1218  'BUYER_PERSON_NAME_LAST' => array('NAME' => Loc::getMessage('BIZVAL_CODE_LAST_NAME' ), 'SORT' => 400, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1219  'BUYER_PERSON_NAME_AGENT' => array('NAME' => Loc::getMessage('BIZVAL_CODE_AGENT_NAME' ), 'SORT' => 500, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1220  'BUYER_PERSON_NAME_CONTACT' => array('NAME' => Loc::getMessage('BIZVAL_CODE_CONTACT_NAME'), 'SORT' => 600, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1221  'BUYER_PERSON_BIRTHDAY' => array('NAME' => Loc::getMessage('BIZVAL_CODE_BIRTHDAY' ), 'SORT' => 700, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1222  'BUYER_PERSON_GENDER' => array('NAME' => Loc::getMessage('BIZVAL_CODE_GENDER' ), 'SORT' => 800, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1223  'BUYER_PERSON_INN' => array('NAME' => Loc::getMessage('BIZVAL_CODE_INN' ), 'SORT' => 900, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1224  'BUYER_PERSON_KPP' => array('NAME' => Loc::getMessage('BIZVAL_CODE_KPP' ), 'SORT' => 1000, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1225  'BUYER_PERSON_ADDRESS' => array('NAME' => Loc::getMessage('BIZVAL_CODE_ADDRESS' ), 'SORT' => 1100, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1226  'BUYER_PERSON_ZIP' => array('NAME' => Loc::getMessage('BIZVAL_CODE_ZIP' ), 'SORT' => 1200, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1227  'BUYER_PERSON_COUNTRY' => array('NAME' => Loc::getMessage('BIZVAL_CODE_COUNTRY' ), 'SORT' => 1300, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1228  'BUYER_PERSON_REGION' => array('NAME' => Loc::getMessage('BIZVAL_CODE_REGION' ), 'SORT' => 1400, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1229  'BUYER_PERSON_STATE' => array('NAME' => Loc::getMessage('BIZVAL_CODE_DISTRICT' ), 'SORT' => 1500, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1230  'BUYER_PERSON_TOWN' => array('NAME' => Loc::getMessage('BIZVAL_CODE_LOCALITY' ), 'SORT' => 1600, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1231  'BUYER_PERSON_CITY' => array('NAME' => Loc::getMessage('BIZVAL_CODE_CITY' ), 'SORT' => 1700, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1232  'BUYER_PERSON_STREET' => array('NAME' => Loc::getMessage('BIZVAL_CODE_STREET' ), 'SORT' => 1800, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1233  'BUYER_PERSON_HOUSING' => array('NAME' => Loc::getMessage('BIZVAL_CODE_HOUSING' ), 'SORT' => 1900, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1234  'BUYER_PERSON_BUILDING' => array('NAME' => Loc::getMessage('BIZVAL_CODE_BUILDING' ), 'SORT' => 2000, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1235  'BUYER_PERSON_APARTMENT' => array('NAME' => Loc::getMessage('BIZVAL_CODE_APARTMENT' ), 'SORT' => 2100, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1236  'BUYER_PERSON_PHONE' => array('NAME' => Loc::getMessage('BIZVAL_CODE_PHONE' ), 'SORT' => 2200, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1237  'BUYER_PERSON_NOTES' => array('NAME' => Loc::getMessage('BIZVAL_CODE_NOTES' ), 'SORT' => 2250, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1238  'BUYER_PERSON_EMAIL' => array('NAME' => Loc::getMessage('BIZVAL_CODE_EMAIL' ), 'SORT' => 2300, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1239  'BUYER_PERSON_F_ADDRESS_FULL'=> array('NAME' => Loc::getMessage('BIZVAL_CODE_F_ADDRESS_FULL'), 'SORT' => 2400, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1240  'BUYER_PERSON_F_INDEX' => array('NAME' => Loc::getMessage('BIZVAL_CODE_F_INDEX' ), 'SORT' => 2500, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1241  'BUYER_PERSON_F_COUNTRY' => array('NAME' => Loc::getMessage('BIZVAL_CODE_F_COUNTRY' ), 'SORT' => 2600, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1242  'BUYER_PERSON_F_REGION' => array('NAME' => Loc::getMessage('BIZVAL_CODE_F_REGION' ), 'SORT' => 2700, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1243  'BUYER_PERSON_F_STATE' => array('NAME' => Loc::getMessage('BIZVAL_CODE_F_STATE' ), 'SORT' => 2800, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1244  'BUYER_PERSON_F_TOWN' => array('NAME' => Loc::getMessage('BIZVAL_CODE_F_TOWN' ), 'SORT' => 2900, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1245  'BUYER_PERSON_F_CITY' => array('NAME' => Loc::getMessage('BIZVAL_CODE_F_CITY' ), 'SORT' => 3000, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1246  'BUYER_PERSON_F_STREET' => array('NAME' => Loc::getMessage('BIZVAL_CODE_F_STREET' ), 'SORT' => 3100, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1247  'BUYER_PERSON_F_BUILDING' => array('NAME' => Loc::getMessage('BIZVAL_CODE_F_BUILDING' ), 'SORT' => 3200, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1248  'BUYER_PERSON_F_HOUSE' => array('NAME' => Loc::getMessage('BIZVAL_CODE_F_HOUSE' ), 'SORT' => 3300, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1249  'BUYER_PERSON_F_FLAT' => array('NAME' => Loc::getMessage('BIZVAL_CODE_F_FLAT' ), 'SORT' => 3400, 'GROUP' => 'BUYER_PERSON' , 'DOMAINS' => array(BusinessValue::INDIVIDUAL_DOMAIN)),
1250  'BUYER_COMPANY_NAME' => array('NAME' => Loc::getMessage('BIZVAL_CODE_NAME' ), 'SORT' => 100, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1251  'BUYER_COMPANY_NAME_AGENT' => array('NAME' => Loc::getMessage('BIZVAL_CODE_AGENT_NAME' ), 'SORT' => 200, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1252  'BUYER_COMPANY_NAME_CONTACT' => array('NAME' => Loc::getMessage('BIZVAL_CODE_CONTACT_NAME'), 'SORT' => 300, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1253  'BUYER_COMPANY_INN' => array('NAME' => Loc::getMessage('BIZVAL_CODE_INN' ), 'SORT' => 400, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1254  'BUYER_COMPANY_KPP' => array('NAME' => Loc::getMessage('BIZVAL_CODE_KPP' ), 'SORT' => 500, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1255  'BUYER_COMPANY_EGRPO' => array('NAME' => Loc::getMessage('BIZVAL_CODE_EGRPO' ), 'SORT' => 600, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1256  'BUYER_COMPANY_OKVED' => array('NAME' => Loc::getMessage('BIZVAL_CODE_OKVED' ), 'SORT' => 700, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1257  'BUYER_COMPANY_OKDP' => array('NAME' => Loc::getMessage('BIZVAL_CODE_OKDP' ), 'SORT' => 800, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1258  'BUYER_COMPANY_OKOPF' => array('NAME' => Loc::getMessage('BIZVAL_CODE_OKOPF' ), 'SORT' => 900, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1259  'BUYER_COMPANY_OKFC' => array('NAME' => Loc::getMessage('BIZVAL_CODE_OKFC' ), 'SORT' => 1000, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1260  'BUYER_COMPANY_OKPO' => array('NAME' => Loc::getMessage('BIZVAL_CODE_OKPO' ), 'SORT' => 1100, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1261  'BUYER_COMPANY_BANK_ACCOUNT' => array('NAME' => Loc::getMessage('BIZVAL_CODE_BANK_ACCOUNT'), 'SORT' => 1200, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1262 
1263  'BUYER_COMPANY_BANK_NAME' => array('NAME' => Loc::getMessage('BIZVAL_CODE_BANK_NAME' ), 'SORT' => 1201, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1264  'BUYER_COMPANY_BANK_BIK' => array('NAME' => Loc::getMessage('BIZVAL_CODE_BANK_BIK' ), 'SORT' => 1202, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1265  'BUYER_COMPANY_BANK_ADDRESS_FULL'=> array('NAME' => Loc::getMessage('BIZVAL_CODE_BANK_ADDRESS_FULL'), 'SORT' => 1203, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1266  'BUYER_COMPANY_BANK_INDEX' => array('NAME' => Loc::getMessage('BIZVAL_CODE_BANK_INDEX' ), 'SORT' => 1204, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1267  'BUYER_COMPANY_BANK_COUNTRY' => array('NAME' => Loc::getMessage('BIZVAL_CODE_BANK_COUNTRY'), 'SORT' => 1205, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1268  'BUYER_COMPANY_BANK_REGION' => array('NAME' => Loc::getMessage('BIZVAL_CODE_BANK_REGION' ), 'SORT' => 1206, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1269  'BUYER_COMPANY_BANK_STATE' => array('NAME' => Loc::getMessage('BIZVAL_CODE_BANK_STATE' ), 'SORT' => 1207, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1270  'BUYER_COMPANY_BANK_TOWN' => array('NAME' => Loc::getMessage('BIZVAL_CODE_BANK_TOWN' ), 'SORT' => 1208, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1271  'BUYER_COMPANY_BANK_CITY' => array('NAME' => Loc::getMessage('BIZVAL_CODE_BANK_CITY' ), 'SORT' => 1209, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1272  'BUYER_COMPANY_BANK_STREET' => array('NAME' => Loc::getMessage('BIZVAL_CODE_BANK_STREET' ), 'SORT' => 1210, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1273  'BUYER_COMPANY_BANK_BUILDING'=> array('NAME' => Loc::getMessage('BIZVAL_CODE_BANK_BUILDING'), 'SORT' => 1211, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1274  'BUYER_COMPANY_BANK_HOUSE' => array('NAME' => Loc::getMessage('BIZVAL_CODE_BANK_HOUSE' ), 'SORT' => 1212, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1275 
1276  'BUYER_COMPANY_ADDRESS' => array('NAME' => Loc::getMessage('BIZVAL_CODE_ADDRESS' ), 'SORT' => 1300, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1277  'BUYER_COMPANY_ZIP' => array('NAME' => Loc::getMessage('BIZVAL_CODE_ZIP' ), 'SORT' => 1400, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1278  'BUYER_COMPANY_COUNTRY' => array('NAME' => Loc::getMessage('BIZVAL_CODE_COUNTRY' ), 'SORT' => 1500, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1279  'BUYER_COMPANY_REGION' => array('NAME' => Loc::getMessage('BIZVAL_CODE_REGION' ), 'SORT' => 1600, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1280  'BUYER_COMPANY_STATE' => array('NAME' => Loc::getMessage('BIZVAL_CODE_DISTRICT' ), 'SORT' => 1700, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1281  'BUYER_COMPANY_TOWN' => array('NAME' => Loc::getMessage('BIZVAL_CODE_LOCALITY' ), 'SORT' => 1800, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1282  'BUYER_COMPANY_CITY' => array('NAME' => Loc::getMessage('BIZVAL_CODE_CITY' ), 'SORT' => 1900, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1283  'BUYER_COMPANY_STREET' => array('NAME' => Loc::getMessage('BIZVAL_CODE_STREET' ), 'SORT' => 2000, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1284  'BUYER_COMPANY_HOUSING' => array('NAME' => Loc::getMessage('BIZVAL_CODE_HOUSING' ), 'SORT' => 2100, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1285  'BUYER_COMPANY_BUILDING' => array('NAME' => Loc::getMessage('BIZVAL_CODE_BUILDING' ), 'SORT' => 2200, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1286  'BUYER_COMPANY_APARTMENT' => array('NAME' => Loc::getMessage('BIZVAL_CODE_APARTMENT' ), 'SORT' => 2300, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1287  'BUYER_COMPANY_PHONE' => array('NAME' => Loc::getMessage('BIZVAL_CODE_PHONE' ), 'SORT' => 2400, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1288  'BUYER_COMPANY_EMAIL' => array('NAME' => Loc::getMessage('BIZVAL_CODE_EMAIL' ), 'SORT' => 2500, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1289  'BUYER_COMPANY_F_ADDRESS_FULL'=> array('NAME' => Loc::getMessage('BIZVAL_CODE_F_ADDRESS_FULL'), 'SORT' => 2600, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1290  'BUYER_COMPANY_F_INDEX' => array('NAME' => Loc::getMessage('BIZVAL_CODE_F_INDEX' ), 'SORT' => 2700, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1291  'BUYER_COMPANY_F_COUNTRY' => array('NAME' => Loc::getMessage('BIZVAL_CODE_F_COUNTRY' ), 'SORT' => 2800, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1292  'BUYER_COMPANY_F_REGION' => array('NAME' => Loc::getMessage('BIZVAL_CODE_F_REGION' ), 'SORT' => 2900, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1293  'BUYER_COMPANY_F_STATE' => array('NAME' => Loc::getMessage('BIZVAL_CODE_F_STATE' ), 'SORT' => 3000, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1294  'BUYER_COMPANY_F_TOWN' => array('NAME' => Loc::getMessage('BIZVAL_CODE_F_TOWN' ), 'SORT' => 3100, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1295  'BUYER_COMPANY_F_CITY' => array('NAME' => Loc::getMessage('BIZVAL_CODE_F_CITY' ), 'SORT' => 3200, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1296  'BUYER_COMPANY_F_STREET' => array('NAME' => Loc::getMessage('BIZVAL_CODE_F_STREET' ), 'SORT' => 3300, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1297  'BUYER_COMPANY_F_BUILDING' => array('NAME' => Loc::getMessage('BIZVAL_CODE_F_BUILDING' ), 'SORT' => 3400, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1298  'BUYER_COMPANY_F_HOUSE' => array('NAME' => Loc::getMessage('BIZVAL_CODE_F_HOUSE' ), 'SORT' => 3500, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1299  'BUYER_COMPANY_F_FLAT' => array('NAME' => Loc::getMessage('BIZVAL_CODE_F_FLAT' ), 'SORT' => 3600, 'GROUP' => 'BUYER_COMPANY', 'DOMAINS' => array(BusinessValue::ENTITY_DOMAIN )),
1300 
1301  );
1302 
1303  self::$personMaxIndex = array();
1304 
1305  $result = Internals\BusinessValueCode1CTable::getList(array('order' => array('CODE_INDEX')));
1306 
1307  while ($row = $result->fetch())
1308  {
1309  $personTypeId = $row['PERSON_TYPE_ID'];
1310  $codeIndex = $row['CODE_INDEX'];
1311 
1312  if (self::$personMaxIndex[$personTypeId] < $codeIndex)
1313  self::$personMaxIndex[$personTypeId] = $codeIndex;
1314 
1315  self::$codes[self::getRekvCodeKey($personTypeId, $codeIndex)] = self::getRekvCode($personTypeId, $codeIndex, $row['NAME']);
1316  }
1317 
1318  self::$codes['1C_REKV_##PERSON_TYPE_ID##_##CODE_INDEX##'] = array(
1319  'SORT' => 100000,
1320  'GROUP' => '1C_REKV',
1322  'NOT_COMMON' => true,
1323  );
1324 
1325  $consumers = array(
1326  self::CONSUMER_KEY => array(
1327  'NAME' => Loc::getMessage('BIZVAL_CONSUMER_1C'),
1328  'SORT' => 400,
1329  'CODES' => &self::$codes, // by ref!
1330  'SKIP_NEW_CODE_SANITATION' => true,
1331  'SANITIZE_MAPPING' => array(__CLASS__, 'sanitizeMapping'),
1332  'SET_MAPPING' => array(__CLASS__, 'setMapping'),
1333  'RENDER_COLUMNS' => array(__CLASS__, 'renderColumns'),
1334  'GET_JAVASCRIPT' => array(__CLASS__, 'getJavaScript'),
1335  ),
1336  );
1337  }
1338 
1339  return $consumers;
1340  }

◆ getJavaScript()

static getJavaScript ( )
static

См. определение в файле businessvalue.php строка 1572

1573  {
1574  return '
1575  var bizvalAdd1CRekv = (function (personMaxIndex) {
1576  "use strict";
1577  return function(anchor, personTypeId, sample)
1578  {
1579  var myRow = anchor.parentNode.parentNode,
1580  table = myRow.parentNode,
1581  newRow = document.createElement("tr");
1582 
1583  if (typeof personMaxIndex[personTypeId] === "undefined")
1584  personMaxIndex[personTypeId] = 0;
1585  else
1586  personMaxIndex[personTypeId] ++;
1587 
1588  newRow.innerHTML = sample.replace(/##CODE_INDEX##/g, personMaxIndex[personTypeId]);
1589 
1590  table.insertBefore(newRow, myRow);
1591  };
1592  })('.(self::$personMaxIndex ? \CUtil::PhpToJSObject(self::$personMaxIndex) : '{}').');
1593  ';
1594  }

◆ getRekvCodeKey()

static getRekvCodeKey (   $personTypeId,
  $codeIndex 
)
static

См. определение в файле businessvalue.php строка 1342

1343  {
1344  return '1C_REKV_'.$personTypeId.'_'.$codeIndex;
1345  }

◆ renderColumns()

static renderColumns (   $codeKey,
  $personTypeId,
array  $mappings,
  $inputNamePrefix 
)
static

См. определение в файле businessvalue.php строка 1467

1468  {
1469  $hideCode = false;
1470 
1471  if ($code = self::$codes[$codeKey])
1472  {
1473  $providerValueInput = BusinessValueControl::getValueInput($personTypeId);
1474  $commonProviderInput = null;
1475  $commonProviderValueInput = BusinessValueControl::getValueInput('');
1476 
1477  if ($codeKey == '1C_REKV_##PERSON_TYPE_ID##_##CODE_INDEX##') // new code
1478  {
1479  $inputNamePrefix = str_replace('##PERSON_TYPE_ID##', $personTypeId, $inputNamePrefix);
1480 
1481  ob_start();
1482 
1483  ?>
1484  <td>
1485  <?=Internals\Input\Manager::getEditHtml($inputNamePrefix.'[NAME]', self::$codeNameInput)?>
1486  </td>
1487  <td>
1488  <?
1489 
1490  BusinessValueControl::renderMapping(
1491  array(),
1492  $inputNamePrefix,
1493  BusinessValueControl::getProviderInput($personTypeId, self::$rekvProviderKeys),
1494  $providerValueInput
1495  );
1496 
1497  ?>
1498  </td>
1499  <?
1500 
1501  $newMappingHTML = ob_get_clean();
1502 
1503  ?>
1504  <td>
1505  <a href="#" onclick="bizvalAdd1CRekv(this, '<?=$personTypeId?>', '<?=\CUtil::JSEscape(htmlspecialcharsbx($newMappingHTML))?>'); return false;">
1506  <?=Loc::getMessage('BIZVAL_CODE_1C_REKV_ADD')?>
1507  </a>
1508  </td>
1509  <td></td>
1510  <?
1511  }
1512  elseif (isset($code['CODE_INDEX'])) // rekv code
1513  {
1514  ?>
1515  <td><?=Internals\Input\Manager::getEditHtml($inputNamePrefix.'[NAME]', self::$codeNameInput, $code['NAME'] ?: $codeKey)?></td>
1516  <td>
1517  <?
1518 
1519  if ($personTypeId)
1520  $commonProviderInput = BusinessValueControl::getProviderInput('', self::$rekvProviderKeys);
1521 
1522  BusinessValueControl::renderMapping(
1523  $mappings,
1524  $inputNamePrefix,
1525  BusinessValueControl::getProviderInput($personTypeId, self::$rekvProviderKeys),
1526  $providerValueInput,
1527  $commonProviderInput,
1528  $commonProviderValueInput
1529  );
1530 
1531  ?>
1532  </td>
1533  <?
1534  }
1535  else // system code
1536  {
1537  ?>
1538  <td><?=htmlspecialcharsbx($code['NAME'] ?: $codeKey)?></td>
1539  <td>
1540  <?
1541 
1542  if ($personTypeId)
1543  $commonProviderInput = BusinessValueControl::getProviderInput('', self::$systemProviderKeys);
1544 
1545  $hideCode = BusinessValueControl::renderMapping(
1546  $mappings,
1547  $inputNamePrefix,
1548  BusinessValueControl::getProviderInput($personTypeId, self::$systemProviderKeys),
1549  $providerValueInput,
1550  $commonProviderInput,
1551  $commonProviderValueInput
1552  );
1553 
1554 // BusinessValueControl::renderDeletor($inputNamePrefix, $mapping, $commonMapping, $defaultMapping);
1555 
1556  ?>
1557  </td>
1558  <?
1559  }
1560  }
1561  else
1562  {
1563  ?>
1564  <td><?=self::CONSUMER_KEY?></td>
1565  <td><?=$codeKey?></td>
1566  <?
1567  }
1568 
1569  return $hideCode;
1570  }

◆ sanitizeMapping()

static sanitizeMapping (   $codeKey,
  $personTypeId,
array &  $mapping 
)
static

См. определение в файле businessvalue.php строка 1359

1360  {
1361  $error = array();
1362 
1363  if (! ($code = self::$codes[$codeKey]) || isset($code['CODE_INDEX']))
1364  {
1365  if ($e = Internals\Input\Manager::getError(self::$codeNameInput, $mapping['NAME']))
1366  $error['NAME'] = $e;
1367  else
1368  $mapping['NAME'] = Internals\Input\Manager::getValue(self::$codeNameInput, $mapping['NAME']);
1369 
1370  $providerKeys = self::$rekvProviderKeys;
1371  }
1372  else
1373  {
1374  $providerKeys = self::$systemProviderKeys;
1375  }
1376 
1377  $error += BusinessValueControl::sanitizeMapping($personTypeId, $mapping, $providerKeys);
1378 
1379  return $error;
1380  }

◆ setMapping()

static setMapping (   $codeKey,
  $personTypeId,
array  $mapping 
)
static

См. определение в файле businessvalue.php строка 1382

1383  {
1384  $systemCode = true;
1385 
1386  if (! ($code = & self::$codes[$codeKey]) || isset($code['CODE_INDEX']))
1387  {
1388  $systemCode = false;
1389 
1390  if ($code)
1391  {
1392  if ($mapping && $mapping['NAME'])
1393  {
1394  if ($mapping['NAME'] != $code['NAME'])
1395  {
1396  $result = Internals\BusinessValueCode1CTable::update(
1397  array(
1398  'PERSON_TYPE_ID' => $code['PERSON_TYPE_ID'],
1399  'CODE_INDEX' => $code['CODE_INDEX'],
1400  ),
1401  array(
1402  'NAME' => $mapping['NAME']
1403  )
1404  );
1405 
1406  if ($result->isSuccess())
1407  $code['NAME'] = $mapping['NAME'];
1408  }
1409  }
1410  else
1411  {
1412  $result = Internals\BusinessValueCode1CTable::delete(array(
1413  'PERSON_TYPE_ID' => $code['PERSON_TYPE_ID'],
1414  'CODE_INDEX' => $code['CODE_INDEX'],
1415  ));
1416 
1417  if ($result->isSuccess())
1418  {
1419  unset(self::$codes[$codeKey]);
1420  $mapping = array(); // delete
1421  }
1422  }
1423  }
1424  else
1425  {
1426  $codeIndex = isset(self::$personMaxIndex[$personTypeId]) ? self::$personMaxIndex[$personTypeId] + 1 : 0;
1427 
1428  if ($mapping && $mapping['NAME'] && $codeKey == self::getRekvCodeKey($personTypeId, $codeIndex))
1429  {
1430  $result = Internals\BusinessValueCode1CTable::add(array(
1431  'PERSON_TYPE_ID' => $personTypeId,
1432  'CODE_INDEX' => $codeIndex,
1433  'NAME' => $mapping['NAME'],
1434  ));
1435 
1436  if ($result->isSuccess())
1437  {
1438  self::$personMaxIndex[$personTypeId] = $codeIndex;
1439  $code = self::getRekvCode($personTypeId, $codeIndex, $mapping['NAME']);
1440 
1441  // move adding button to the end
1442  $addCode = self::$codes['1C_REKV_##PERSON_TYPE_ID##_##CODE_INDEX##'];
1443  unset(self::$codes['1C_REKV_##PERSON_TYPE_ID##_##CODE_INDEX##']);
1444  self::$codes['1C_REKV_##PERSON_TYPE_ID##_##CODE_INDEX##'] = $addCode;
1445  }
1446  }
1447  else
1448  {
1449  return new \Bitrix\Main\Result();
1450  }
1451  }
1452  }
1453 
1454  $mapping = $mapping['PROVIDER_KEY']
1455  ? array(
1456  'PROVIDER_KEY' => $mapping['PROVIDER_KEY' ],
1457  'PROVIDER_VALUE' => $mapping['PROVIDER_VALUE'],
1458  )
1459  : array();
1460 
1461 
1462  return isset($result) && ! $result->isSuccess()
1463  ? $result
1464  : BusinessValue::setMapping($codeKey, self::CONSUMER_KEY, $personTypeId, $mapping, $systemCode);
1465  }

Поля

◆ $personMaxIndex

$personMaxIndex
static

См. определение в файле businessvalue.php строка 1202

◆ CONSUMER_KEY

const CONSUMER_KEY = '1C'

См. определение в файле businessvalue.php строка 1200


Объявления и описания членов класса находятся в файле:
Bitrix\Sale\BusinessValue\INDIVIDUAL_DOMAIN
const INDIVIDUAL_DOMAIN
Definition: businessvalue.php:16
Bitrix\Main\Localization\Loc\getMessage
static getMessage($code, $replace=null, $language=null)
Returns translation by message code.
Definition: loc.php:29
Bitrix\Sale\BusinessValueConsumer1C\getRekvCodeKey
static getRekvCodeKey($personTypeId, $codeIndex)
Definition: businessvalue.php:1342
Bitrix\Sale\BusinessValue\ENTITY_DOMAIN
const ENTITY_DOMAIN
Definition: businessvalue.php:15
Bitrix\Sale\Internals\Input\Manager\getValue
static getValue(array $input, $value)
Get normalized user input value (for example to save to database).
Definition: sale/lib/internals/input.php:156
Bitrix\Sale\Internals\Input\Manager\getEditHtml
static getEditHtml($name, array $input, $value=null)
Return html input control for value.
Definition: sale/lib/internals/input.php:81
Bitrix\Sale\BusinessValue\setMapping
static setMapping($codeKey, $consumerKey, $personTypeId, array $mapping, $withCommon=false)
Set mapping.
Definition: businessvalue.php:192