1
0
mirror of synced 2024-11-24 22:36:07 +03:00

ref #87457 generate password corporate client and checking emptines user in order (#271)

This commit is contained in:
Kocmonavtik 2023-01-09 12:18:37 +03:00 committed by GitHub
parent e046a1d6f1
commit be5d7ba33e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 28 additions and 3 deletions

View File

@ -1,3 +1,7 @@
## 2022-12-28 v.6.1.12
- Исправление генерации пароля у корпоративного клиента
- Добавлена проверка на существование пользователя в заказе
## 2022-12-13 v.6.1.11
- Добавление фильтрации не активных справочников и статусов

View File

@ -335,6 +335,7 @@ class RetailCrmHistory
->setContragentTypes($contragentTypes)
->setDataCrm($order)
->build();
$corporateCustomerBuilder->getCustomerBuilder()->buildPassword();
if (RetailCrmOrder::isOrderCorporate($order)) {
// Fetch contact only if we think it's data is not fully present in order

View File

@ -495,6 +495,16 @@ class RetailCrmOrder
continue;
}
if (empty($order['USER_ID'])) {
RCrmActions::eventLog(
'RetailCrmOrder::uploadOrders',
'Order::load',
'The user does not exist in order: ' . $order['ID']
);
continue;
}
self::createCustomerForOrder($api, $arCustomer, $arCustomerCorporate,$arParams, $order, $site);
if (isset($order['RESPONSIBLE_ID']) && !empty($order['RESPONSIBLE_ID'])) {
@ -584,6 +594,16 @@ class RetailCrmOrder
$optionsContragentType = RetailcrmConfigProvider::getContragentTypes();
$user = UserTable::getById($order['USER_ID'])->fetch();
if (!$user) {
RCrmActions::eventLog(
'RetailCrmOrder::createCustomerForOrder',
'UserTable::getById',
'Error find user: ' . $order['USER_ID'] . ' in order: ' . $order['ID']
);
return;
}
if ('Y' === RetailcrmConfigProvider::getCorporateClientStatus()) {
if (true === RetailCrmCorporateClient::isCorpTookExternalId((string) $user['ID'], $api)) {
RetailCrmCorporateClient::setPrefixForExternalId((string) $user['ID'], $api);

View File

@ -1 +1 @@
- Исправление вывода значений в блоках маппинга (добавление фильтрации по активности поля)
- Исправление генерации пароля у корпоративного клиента, проверка существования пользователя в заказе

View File

@ -1,6 +1,6 @@
<?php
$arModuleVersion = [
'VERSION' => '6.1.11',
'VERSION_DATE' => '2022-12-13 12:30:00'
'VERSION' => '6.1.12',
'VERSION_DATE' => '2022-12-28 17:30:00'
];