1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
exportonecsubordinatesale.php
См. документацию.
1<?php
2
3namespace Bitrix\Sale\Exchange;
4
5
6use Bitrix\Sale\Exchange\Entity\SubordinateSale\EntityImportFactory;
7use Bitrix\Sale\Exchange\OneC\DocumentBase;
8use Bitrix\Sale\Exchange\OneC\PaymentDocument;
9use Bitrix\Sale\Exchange\OneC\ShipmentDocument;
10use Bitrix\Sale\Exchange\OneC\SubordinateSale\ConverterFactory;
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}
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804