1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
invoice.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Sale\Exchange\Entity;
4
5
6
use Bitrix\Crm\Invoice\EntityMarker;
7
use Bitrix\Main\ArgumentException;
8
use Bitrix\Sale\Exchange\EntityType;
9
use Bitrix\Sale\Internals\Entity;
10
use Bitrix\Sale\Order;
11
12
class
Invoice
extends
OrderImport
13
{
17
public
function
getOwnerTypeId
()
18
{
19
return
EntityType::INVOICE
;
20
}
21
27
protected
function
addMarker
($invoice,
$entity
,
$result
)
28
{
29
EntityMarker::addMarker($invoice,
$entity
,
$result
);
30
}
31
36
protected
function
createEntity
(
array
$fileds)
37
{
38
return \Bitrix\Crm\Invoice\Invoice::create($this->settings->getSiteId(), $fileds[
'USER_ID'
], $this->settings->getCurrency());
39
}
40
45
protected
function
loadParentEntity(
array
$fields
)
46
{
47
$entity
=
null
;
48
49
if
(!empty(
$fields
[
'ID'
]))
50
{
52
$entity
= \Bitrix\Crm\Invoice\Invoice::load(
$fields
[
'ID'
]);
53
}
54
return
$entity
;
55
}
56
62
public
static
function
resolveEntityTypeId
(
Entity
$order
)
63
{
64
if
(!(
$order
instanceof Order))
65
throw
new
ArgumentException
(
"Entity must be instanceof Order"
);
66
67
return
EntityType::INVOICE
;
68
}
69
74
protected
function
getShipmentTypeId
()
75
{
76
return
EntityType::INVOICE_SHIPMENT
;
77
}
78
}
Bitrix\Main\ArgumentException
Определения
ArgumentException.php:9
Bitrix\Sale\Exchange\Entity\EntityImport\$entity
$entity
Определения
entityimport.php:22
Bitrix\Sale\Exchange\Entity\Invoice
Определения
invoice.php:13
Bitrix\Sale\Exchange\Entity\Invoice\getShipmentTypeId
getShipmentTypeId()
Определения
invoice.php:74
Bitrix\Sale\Exchange\Entity\Invoice\addMarker
addMarker($invoice, $entity, $result)
Определения
invoice.php:27
Bitrix\Sale\Exchange\Entity\Invoice\createEntity
createEntity(array $fileds)
Определения
invoice.php:36
Bitrix\Sale\Exchange\Entity\Invoice\getOwnerTypeId
getOwnerTypeId()
Определения
invoice.php:17
Bitrix\Sale\Exchange\Entity\Invoice\resolveEntityTypeId
static resolveEntityTypeId(Entity $order)
Определения
invoice.php:62
Bitrix\Sale\Exchange\Entity\OrderImport
Определения
orderimport.php:18
Bitrix\Sale\Exchange\EntityType\INVOICE
const INVOICE
Определения
entitytype.php:16
Bitrix\Sale\Exchange\EntityType\INVOICE_SHIPMENT
const INVOICE_SHIPMENT
Определения
entitytype.php:17
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$result
$result
Определения
get_property_values.php:14
$entity
$entity
Определения
group_bizproc_workflow_delete.php:17
Bitrix\Main\Entity
Определения
ufield.php:9
$order
$order
Определения
payment.php:8
$fields
$fields
Определения
yandex_run.php:501
bitrix
modules
sale
lib
exchange
entity
invoice.php
Создано системой
1.14.0