14 parent::getFieldsInfo(),
15 array(
'SUBORDINATES'=>array())
25 $result = parent::prepareFieldsData($document);
27 foreach(static::getFieldsInfo() as $k=>$v)
48 if(is_array($value[
"#"][$message[
"SALE_EXPORT_SUBORDINATES"]][0][
"#"][$message[
"SALE_EXPORT_SUBORDINATE"]][0][
"#"]))
50 $rawSubordinates = $value[
"#"][$message[
"SALE_EXPORT_SUBORDINATES"]][0][
"#"][$message[
"SALE_EXPORT_SUBORDINATE"]];
52 foreach ($rawSubordinates as $raw)
56 $result[] = $document::prepareFieldsData($raw);
64 $info[
'ITEMS'][
'FIELDS'][
'BASE_UNIT'] = array(
76 $xml = parent::outputXml(
$fields, $level);
78 foreach (
$fields as $name=>$value)
85 if(is_array($value) && count($value)>0)
88 foreach ($value as $v)
91 $typeId = static::resolveDocumentTypeId($v[
'OPERATION']);
95 $document->setFields($v);
96 $xml .= $document->output($level+2);
openNodeDirectory($level, $name)
static resolveRawDocumentTypeId(array $document)
closeNodeDirectory($level, $name)
static create($documentTypeID)
static prepareFieldsData(array $document)
outputXml(array $fields, $level=0)
static resolveSubordinateDocuments($value)
static unitFieldsInfo(&$info)