Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 2026-04-15 v6.7.13
- Исправлена обработка пустой даты рождения клиента при нормализации

## 2026-04-09 v6.7.12
- Исправлена передача даты рождения клиента при пустом значении поля в Bitrix

Expand Down
6 changes: 3 additions & 3 deletions intaro.retailcrm/classes/general/user/RetailCrmUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ private static function getSimpleCustomer(array $arFields): array
$customer['address']['city'] = $arFields['PERSONAL_CITY'] ?? null;
$customer['address']['text'] = $arFields['PERSONAL_STREET'] ?? null;
$customer['address']['index'] = $arFields['PERSONAL_ZIP'] ?? null;
$customer['birthday'] = !empty($arFields['PERSONAL_BIRTHDAY'])
? new \DateTime($arFields['PERSONAL_BIRTHDAY'])
: null;
if (!empty($arFields['PERSONAL_BIRTHDAY']) && $arFields['PERSONAL_BIRTHDAY'] !== '') {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А зачем проваерка $arFields['PERSONAL_BIRTHDAY'] !== '' ? empty и так проверит на пустую строку.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Возможно, стоит тогда рассмотреть вариант уйти от null ? Предложенная проверка выглядит странно, вы и так тут !empty($arFields['PERSONAL_BIRTHDAY']) проверяете все возможные пустые значения и потом еще дополнительно проверяете на пустую строку.

$customer['birthday'] = new \DateTime($arFields['PERSONAL_BIRTHDAY']);
}

if (mb_strlen($arFields['EMAIL']) < 100) {
$customer['email'] = $arFields['EMAIL'];
Expand Down
2 changes: 1 addition & 1 deletion intaro.retailcrm/description.ru
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- Исправлена передача даты рождения клиента при пустом значении поля в Bitrix
- Исправлена обработка пустой даты рождения клиента при нормализации
4 changes: 2 additions & 2 deletions intaro.retailcrm/install/version.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

$arModuleVersion = [
'VERSION' => '6.7.12',
'VERSION_DATE' => '2026-04-09 12:00:00'
'VERSION' => '6.7.13',
'VERSION_DATE' => '2026-04-15 12:00:00'
];
2 changes: 1 addition & 1 deletion intaro.retailcrm/lib/component/constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
class Constants
{
public const MODULE_VERSION = '6.7.12';
public const MODULE_VERSION = '6.7.13';
public const CRM_PURCHASE_PRICE_NULL = 'purchasePrice_null';
public const BITRIX_USER_ID_PREFIX = 'bitrixUserId-';
public const CRM_USERS_MAP = 'crm_users_map';
Expand Down
Loading