1
0
Fork 0
mirror of synced 2025-04-04 14:23:33 +03:00
Исправления кода
This commit is contained in:
Ivan Chaplygin 2023-09-08 12:38:30 +03:00
parent 1f1c30c434
commit 9177a95607

View file

@ -423,15 +423,13 @@ class RetailCrmOrder
$order['privilegeType'] = LoyaltyAccountService::getPrivilegeType($client, $arParams);
$arUser = UserTable::getById($arOrder['USER_ID'])->fetch();
$fioBitrix['firstName'] = $arUser['NAME'];
$fioBitrix['lastName'] = $arUser['LAST_NAME'];
$fioCrm = [$order['firstName'] ?? null, $order['lastName'] ?? null, $order['patronymic'] ?? null];
$fioCrm[] = $order['firstName'] ?? null;
$fioCrm[] = $order['lastName'] ?? null;
$fioCrm[] = $order['patronymic'] ?? null;
if (in_array($fioBitrix['firstName'], $fioCrm) && in_array($fioBitrix['lastName'], $fioCrm)) {
if (in_array($arUser['NAME'], $fioCrm)) {
$order['firstName'] = $arUser['NAME'];
}
if (in_array($arUser['LAST_NAME'], $fioCrm)) {
$order['lastName'] = $arUser['LAST_NAME'];
}