Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
exportonecsubordinatesale.php
1<?php
2
4
5
11
13{
18 protected function converterFactoryCreate($typeId)
19 {
20 return ConverterFactory::create($typeId);
21 }
22
27 protected function documentFactoryCreate($typeId)
28 {
29 return \Bitrix\Sale\Exchange\OneC\SubordinateSale\DocumentFactory::create($typeId);
30 }
31
35 protected function convertDocumentFields(array $documents)
36 {
37 parent::convertDocumentFields($documents);
38
39 $documentOrder = $this->getDocumentByTypeId(EntityType::ORDER, $documents);
40 $fieldsOrder = $documentOrder->getFieldValues();
41 foreach ($documents as $document)
42 {
43 if($document instanceof PaymentDocument || $document instanceof ShipmentDocument)
44 {
45
46 $fieldsOrder['SUBORDINATES'][] = $document->getFieldValues();
47 }
48 }
49 $documentOrder->setFields($fieldsOrder);
50 }
51
55 protected function getShemVersion()
56 {
57 return static::SHEM_VERSION_2_10;
58 }
59
64 protected function modifyDocumentsCollection(array $list)
65 {
66 return array($this->getDocumentByTypeId(EntityType::ORDER, $list));
67 }
68
73 protected function entityFactoryCreate($typeId)
74 {
75 return EntityImportFactory::create($typeId);
76 }
77}