2namespace Bitrix\Sale\Exchange\OneC;
5use Bitrix\Main\ArgumentOutOfRangeException;
6use Bitrix\Main\Type\DateTime;
7use Bitrix\Sale\Exchange\EntityType;
8use Bitrix\Sale\Exchange\IConverter;
9use Bitrix\Sale\Exchange\ImportOneCBase;
10use Bitrix\Sale\Exchange\ISettings;
30 private static $instances =
null;
41 $typeId = (int)$typeId;
44 if(!DocumentType::IsDefined($typeId))
49 if(self::$instances ===
null || !isset(self::$instances[$typeId]))
51 if(self::$instances ===
null)
53 self::$instances =
array();
56 if(!isset(self::$instances[$typeId]))
61 return self::$instances[$typeId];
79 return $this->entityTypeId;
84 return $this->documentTypeId;
102 switch($fieldInfo[
'TYPE'])
105 $value = self::toText($value);
109 $value = \CDatabase::FormatDate($value->toString(), \CSite::GetDateFormat(
"FULL", LANG),
"HH:MI:SS");
113 $value = \CDatabase::FormatDate($value->toString(), \CSite::GetDateFormat(
"FULL", LANG),
"YYYY-MM-DD");
117 $value = \CDatabase::FormatDate($value->toString(), \CSite::GetDateFormat(
"FULL", LANG),
"YYYY-MM-DD HH:MI:SS");
120 $value = $value ==
'Y'?
'true':
'false';
123 $value = intval($value);
135 $value = preg_replace(
'/<style[^>]*>.*?<\/style>/is',
'', $value);
136 $value = preg_replace(
'/<blockquote[^>]*>.*?<\/blockquote>/is',
'', $value);
137 $value = preg_replace(
'/<script[^>]*>.*?<\/script>/is',
'', $value);
139 return html_entity_decode(
141 preg_replace(
'/(<br[^>]*>)+/isu',
"\n", $value)
153 list($productXmlId, $offerXmlId) = explode(
"#", $xml_id, 2);
154 if ($productXmlId === $offerXmlId)
155 $xml_id = $productXmlId;
169 foreach($rekv as $kRekv=>$vRekv)
182 $fieldInfo[
'TYPE'] =
'datetime';
233 if(
$key ===
'REK_VALUES' ||
$key ===
'ADDRESS_FIELD' ||
$key ===
'CONTACT' ||
$key ===
'REPRESENTATIVE')
235 $groupFieldValues =
array();
236 foreach ($value as
$k=>$v)
244 if(
count($groupFieldValues)>0)
277 $res = \CSite::getList(
"sort",
"desc");
299 foreach(
$items as $productXML_ID => $item)
static isDefined($typeID)
const DELIVERY_SERVICE_XMLID
externalizeField(&$value, $fieldInfo=null)
const CURRENCY_RATE_DEFAULT
modifyItemIdByItemName($fields)
externalizeRekv(array $rekv, array $info)
externalizeRekvValue($kRekv, $vRekv, array $info)
static getSiteNameByLid($lid)
const MEASURE_CODE_DEFAULT
static getInstance($typeId)
init(ISettings $settings, $entityTypeId=EntityType::UNDEFINED, $documentTypeId=DocumentType::UNDEFINED)
modifyTrim(array $fields)
static normalizeExternalCode($code)
static getLangByCodeField($code)
static isDefined($typeID)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
if($NS['step']==6) if( $NS[ 'step']==7) if(COption::GetOptionInt('main', 'disk_space', 0) > 0) $info
if(empty($signedUserToken)) $key
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"