Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
exportonecsubordinatesale.php
1
<?php
2
3
namespace
Bitrix\Sale\Exchange
;
4
5
6
use
Bitrix\Sale\Exchange\Entity\SubordinateSale\EntityImportFactory
;
7
use
Bitrix\Sale\Exchange\OneC\DocumentBase
;
8
use
Bitrix\Sale\Exchange\OneC\PaymentDocument
;
9
use
Bitrix\Sale\Exchange\OneC\ShipmentDocument
;
10
use
Bitrix\Sale\Exchange\OneC\SubordinateSale\ConverterFactory
;
11
12
final
class
ExportOneCSubordinateSale
extends
ExportOneCPackage
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
}
Bitrix\Sale\Exchange\Entity\EntityImportFactory
Definition
entityimportfactory.php:13
Bitrix\Sale\Exchange\EntityType\ORDER
const ORDER
Definition
entitytype.php:8
Bitrix\Sale\Exchange\ExportOneCPackage
Definition
exportonecpackage.php:27
Bitrix\Sale\Exchange\ExportOneCSubordinateSale
Definition
exportonecsubordinatesale.php:13
Bitrix\Sale\Exchange\ExportOneCSubordinateSale\modifyDocumentsCollection
modifyDocumentsCollection(array $list)
Definition
exportonecsubordinatesale.php:64
Bitrix\Sale\Exchange\ExportOneCSubordinateSale\entityFactoryCreate
entityFactoryCreate($typeId)
Definition
exportonecsubordinatesale.php:73
Bitrix\Sale\Exchange\ExportOneCSubordinateSale\convertDocumentFields
convertDocumentFields(array $documents)
Definition
exportonecsubordinatesale.php:35
Bitrix\Sale\Exchange\ExportOneCSubordinateSale\getShemVersion
getShemVersion()
Definition
exportonecsubordinatesale.php:55
Bitrix\Sale\Exchange\ExportOneCSubordinateSale\documentFactoryCreate
documentFactoryCreate($typeId)
Definition
exportonecsubordinatesale.php:27
Bitrix\Sale\Exchange\ExportOneCSubordinateSale\converterFactoryCreate
converterFactoryCreate($typeId)
Definition
exportonecsubordinatesale.php:18
Bitrix\Sale\Exchange\OneC\DocumentBase
Definition
documentbase.php:16
Bitrix\Sale\Exchange\OneC\PaymentDocument
Definition
paymentdocument.php:5
Bitrix\Sale\Exchange\OneC\ShipmentDocument
Definition
shipmentdocument.php:5
Bitrix\Sale\Exchange\OneC\SubordinateSale\ConverterFactory
Definition
converterfactory.php:14
Bitrix\Sale\Exchange
Definition
basetrait.php:2
modules
sale
lib
exchange
exportonecsubordinatesale.php
Создано системой
1.10.0