Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
converterdocumentinvoice.php
1
<?php
2
3
namespace
Bitrix\Sale\Exchange\OneC
;
4
5
6
class
ConverterDocumentInvoice
extends
ConverterDocumentOrder
7
{
8
public
static
function
normalizeExternalCode
($xml)
9
{
10
static
$sales =
null
;
11
12
list($originatorId, $productXmlId) = explode(
"#"
, $xml, 2);
13
if
($productXmlId<>
''
)
14
{
15
if
($sales ===
null
)
16
$sales = \CCrmExternalSaleHelper::PrepareListItems();
17
18
if
(isset($sales[$originatorId]))
19
{
20
$xml = $productXmlId;
21
}
22
}
23
24
return
parent::normalizeExternalCode($xml);
25
}
26
31
static
protected
function
getStatusNameById
($id)
32
{
33
static
$statuses;
34
35
if
($statuses ===
null
)
36
{
37
while
($status = \
Bitrix
\Crm\
Invoice
\InvoiceStatus::getList()->fetch())
38
{
39
$statuses[$status[
'STATUS_ID'
]] = $status[
'NAME'
];
40
}
41
42
if
(!is_array($statuses))
43
{
44
$statuses = array();
45
}
46
}
47
return
(isset($statuses[$id])?$statuses[$id]:
''
);
48
}
49
}
Bitrix\Sale\Exchange\Entity\Invoice
Definition
invoice.php:13
Bitrix\Sale\Exchange\OneC\ConverterDocumentInvoice
Definition
converterdocumentinvoice.php:7
Bitrix\Sale\Exchange\OneC\ConverterDocumentInvoice\getStatusNameById
static getStatusNameById($id)
Definition
converterdocumentinvoice.php:31
Bitrix\Sale\Exchange\OneC\ConverterDocumentInvoice\normalizeExternalCode
static normalizeExternalCode($xml)
Definition
converterdocumentinvoice.php:8
Bitrix\Sale\Exchange\OneC\ConverterDocumentOrder
Definition
converterdocumentorder.php:21
Bitrix\Sale\Exchange\OneC
Definition
documents.php:2
Bitrix
modules
sale
lib
exchange
onec
converterdocumentinvoice.php
Создано системой
1.10.0