Код по созданию заказа:
$params_add_sale = ['fields' => ['lid' => 's1',
'personTypeId' => 4,
'UserId' => 2,
'currency' => 'RUB',
'dateInsert' => $lastday,
'statusId' => 'N',
'companyId' => 819,
'responsibleId' => 20,
'userDescription'=>$number_dogovor.','.$date_dogovor,
'additionalInfo' => $k['ID']]];
$method_add_sale = '/sale.order.add';
$data_add_sale = $bx->call($method_add_sale, $params_add_sale);
Ответ:
Array
(
[result] => Array
(
[order] => Array
(
[accountNumber] => 3824
[additionalInfo] => 1377
[canceled] => N
[clients] => Array
(
[0] => Array
(
[entityId] => 1573
[entityTypeId] => 3
[id] => 4627
[isPrimary] => Y
[orderId] => 3824
)
[1] => Array
(
[entityId] => 1055
[entityTypeId] => 4
[id] => 4628
[isPrimary] => Y
[orderId] => 3824
)
)
[companyId] => 819
[currency] => RUB
[dateInsert] => 2021-09-09T00:00:00+03:00
[dateStatus] => 2021-03-20T12:00:15+03:00
[dateUpdate] => 2021-03-20T12:00:15+03:00
[deducted] => N
[empStatusId] => 20
[id] => 3824
[lid] => s1
[payed] => N
[personTypeId] => 4
[personTypeXmlId] =>
[propertyValues] => Array
(
...
)
[requisiteLink] => Array
(
...
)
[responsibleId] => 8
[statusId] => N
[statusXmlId] =>
[updated1c] => N
[userDescription] => 131К-01\20,01.02.2020
[userId] => 2
[xmlId] => bx_6055b99f37929
)
)
)
поле clients говорит о том, что создались новые компания и контакт.
Вопрос задан
более трёх лет назад
624 просмотра