Skip to content

Commit dbca291

Browse files
danilakobelevn-hubdanila
andauthored
Исправлена ошибка переноса данных между клиентами при синхронизации истории (#418)
Co-authored-by: danila <kobelev@retailcrm.ru>
1 parent ec78a76 commit dbca291

4 files changed

Lines changed: 11 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 2026-04-01 v6.7.10
2+
- Исправлена ошибка переноса данных между клиентами при синхронизации истории
3+
14
## 2026-03-16 v6.7.9
25
- Добавлена дополнительная проверка на наличие подписки у пользователя
36

intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,10 @@ public static function customerHistory()
126126
RetailcrmConfigProvider::setCustomersHistorySinceId($lastId['id']);
127127

128128
$newUser = new CUser();
129-
$customerBuilder = new CustomerBuilder();
130129

131130
foreach ($customers as $customer) {
131+
$customerBuilder = new CustomerBuilder();
132+
132133
if (function_exists('retailCrmBeforeCustomerSave')) {
133134
$newResCustomer = retailCrmBeforeCustomerSave($customer);
134135
if (is_array($newResCustomer) && !empty($newResCustomer)) {
@@ -144,11 +145,9 @@ public static function customerHistory()
144145
continue;
145146
}
146147

147-
if (RetailcrmConfigProvider::isPhoneRequired()) {
148-
if (isset($customer['create']) && empty($customer['phones'])) {
149-
Logger::getInstance()->write('$customer["phones"] is empty. Customer ' . $customer['id'] . ' cannot be created', 'createCustomerError');
150-
continue;
151-
}
148+
if (RetailcrmConfigProvider::isPhoneRequired() && !isset($customer['externalId']) && (!isset($customer['phones']) || count($customer['phones']) === 0)) {
149+
Logger::getInstance()->write('$customer["phones"] is empty. Customer ' . $customer['id'] . ' cannot be created', 'createCustomerError');
150+
continue;
152151
}
153152

154153
if (isset($customer['externalId']) && !is_numeric($customer['externalId'])) {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

33
$arModuleVersion = [
4-
'VERSION' => '6.7.9',
5-
'VERSION_DATE' => '2026-03-16 17:30:00'
4+
'VERSION' => '6.7.10',
5+
'VERSION_DATE' => '2026-04-01 17:30:00'
66
];

intaro.retailcrm/lib/component/constants.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919
class Constants
2020
{
21-
public const MODULE_VERSION = '6.7.9';
21+
public const MODULE_VERSION = '6.7.10';
2222
public const CRM_PURCHASE_PRICE_NULL = 'purchasePrice_null';
2323
public const BITRIX_USER_ID_PREFIX = 'bitrixUserId-';
2424
public const CRM_USERS_MAP = 'crm_users_map';

0 commit comments

Comments
 (0)