1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
base.php
См. документацию.
1
<?php
2
3
4
namespace
Bitrix\Sale\Exchange\Integration\Timeline
;
5
6
7
use
Bitrix\Sale\Exchange\Integration
;
8
use
Bitrix\Sale\Exchange\Manager
;
9
10
class
Base
11
{
12
static
protected
function
onReceive
(
$orderId
,
array
$settings
)
13
{
14
$item =
\Bitrix\Sale\Exchange\Integration\Relation\Relation::getByEntity
(
15
Integration
\
EntityType::ORDER
,
16
$orderId
,
17
Integration
\
CRM
\
EntityType::DEAL
,
18
''
19
);
20
21
$relation =
Integration\Relation\Relation::createFromArray
([
22
'SRC_ENTITY_TYPE_ID'
=>$item[
'SRC_ENTITY_TYPE_ID'
],
23
'SRC_ENTITY_ID'
=>$item[
'SRC_ENTITY_ID'
],
24
'DST_ENTITY_TYPE_ID'
=>$item[
'DST_ENTITY_TYPE_ID'
],
25
'DST_ENTITY_ID'
=>$item[
'DST_ENTITY_ID'
]
26
]);
27
28
$proxy
=
new
Integration\Rest\RemoteProxies\CRM\Timeline
();
29
30
$r =
$proxy
->onReceive(
31
$relation->getDestinationEntityId(),
32
$relation->getDestinationEntityTypeId(),
33
$settings
34
);
35
36
if
($r->isSuccess())
37
{
38
$result
= $r->getData()[
'DATA'
][
'result'
];
39
}
40
else
41
{
42
$result
[
'error'
] = $r->getErrorMessages();
43
}
44
45
//ECHO '<pre>'; PRINT_R($order->getFields()->getOriginalValues());DIE;
46
//ECHO '<pre>'; PRINT_R($result);DIE;
47
}
48
49
static
protected
function
isSync
(\
Bitrix
\
Sale
\Order
$order
)
50
{
51
return
(
new
Integration
\
Connector
\
Manager
())->isOn() &&
$order
->getField(
'IS_SYNC_B24'
) ==
'Y'
;
52
}
53
}
Bitrix\Sale\Cashbox\Manager
Определения
manager.php:22
Bitrix\Sale\Exchange\Integration\CRM\EntityType\DEAL
const DEAL
Определения
entitytype.php:7
Bitrix\Sale\Exchange\Integration\CRM\Placement\Base
Определения
base.php:11
Bitrix\Sale\Exchange\Integration\EntityType\ORDER
const ORDER
Определения
entitytype.php:12
Bitrix\Sale\Exchange\Integration\Relation\Relation\createFromArray
static createFromArray(array $data)
Определения
relation.php:106
Bitrix\Sale\Exchange\Integration\Relation\Relation\getByEntity
static getByEntity($sourceEntityTypeId, $sourceEntityId, $destinationEntityTypeId, $destinationEntityId='')
Определения
relation.php:88
Bitrix\Sale\Exchange\Integration\Timeline\Base\isSync
static isSync(\Bitrix\Sale\Order $order)
Определения
base.php:49
Bitrix\Sale\Exchange\Integration\Timeline\Base\onReceive
static onReceive($orderId, array $settings)
Определения
base.php:12
$orderId
$orderId
Определения
payment.php:5
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
$proxy
$proxy
Определения
proxy.php:11
Bitrix\Catalog\Integration
Bitrix\Sale\Exchange\Integration\CRM
Определения
entitytype.php:2
Bitrix\Sale\Exchange\Integration\Connector
Определения
manager.php:4
Bitrix\Sale\Exchange\Integration\Manager
Определения
statistic.php:4
Bitrix\Sale\Exchange\Integration\Timeline
Определения
base.php:4
Bitrix\Sale\Exchange\Integration
Bitrix\Sale
Bitrix
$order
$order
Определения
payment.php:8
$settings
$settings
Определения
product_settings.php:43
bitrix
modules
sale
lib
exchange
integration
timeline
base.php
Создано системой
1.14.0