1
0
mirror of synced 2024-11-22 13:26:10 +03:00

ref #89521 Исправление ошибки при изменении настроек модуля (#296)

This commit is contained in:
Kocmonavtik 2023-06-08 09:33:56 +03:00 committed by GitHub
parent 555d7e2513
commit 57419cadc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 29 additions and 5 deletions

View File

@ -1,3 +1,6 @@
## 2023-06-07 v.6.3.11
- Исправление критической ошибки при изменении настроек модуля
## 2023-06-02 v.6.3.10 ## 2023-06-02 v.6.3.10
- Добавлено ограничение по магазинам для типов доставок и оплат - Добавлено ограничение по магазинам для типов доставок и оплат

View File

@ -1 +1 @@
- Добавлено ограничение по магазинам для типов доставок и оплат - Исправление критической ошибки при изменении настроек модуля

View File

@ -1,6 +1,6 @@
<?php <?php
$arModuleVersion = [ $arModuleVersion = [
'VERSION' => '6.3.10', 'VERSION' => '6.3.11',
'VERSION_DATE' => '2023-06-02 11:00:00' 'VERSION_DATE' => '2023-06-07 18:00:00'
]; ];

View File

@ -688,8 +688,8 @@ if (isset($_POST['Update']) && ($_POST['Update'] === 'Y')) {
COption::SetOptionString($mid, $EVENTS_DEACTIVATE, serialize($deactivateEvents)); COption::SetOptionString($mid, $EVENTS_DEACTIVATE, serialize($deactivateEvents));
} }
} else { } else {
$deactivateAgents = unserialize(COption::GetOptionString($mid, $AGENTS_DEACTIVATE, [])); $deactivateAgents = unserialize(COption::GetOptionString($mid, $AGENTS_DEACTIVATE, ''));
$deactivateEvents = unserialize(COption::GetOptionString($mid, $EVENTS_DEACTIVATE, [])); $deactivateEvents = unserialize(COption::GetOptionString($mid, $EVENTS_DEACTIVATE, ''));
if (!empty($deactivateAgents)) { if (!empty($deactivateAgents)) {
$dateAgent = new DateTime(); $dateAgent = new DateTime();

View File

@ -175,6 +175,7 @@ class RetailCrmHistory_v5Test extends \BitrixTestCase
{ {
$currency = CurrencyManager::getBaseCurrency(); $currency = CurrencyManager::getBaseCurrency();
$cmsOrder = Order::create('bitrix', 1, $currency); $cmsOrder = Order::create('bitrix', 1, $currency);
$cmsOrder->setPersonTypeId('bitrixType');
$crmManagerId = 123; $crmManagerId = 123;
RetailcrmConfigProvider::setUsersMap(['bitrixUserId-1515' => $crmManagerId]); RetailcrmConfigProvider::setUsersMap(['bitrixUserId-1515' => $crmManagerId]);

View File

@ -66,6 +66,7 @@ class RetailCrmOrder_v5Test extends BitrixTestCase {
public function testFieldExists(): void public function testFieldExists(): void
{ {
$order = \Bitrix\Sale\Order::create('s1', 1, 'RUB'); $order = \Bitrix\Sale\Order::create('s1', 1, 'RUB');
$order->setPersonTypeId('bitrixType');
$flag = true; $flag = true;
try { try {
@ -136,4 +137,23 @@ class RetailCrmOrder_v5Test extends BitrixTestCase {
], ],
]]; ]];
} }
/**
* @runInSeparateProcess
* @preserveGlobalState disabled
*/
public function testUploadOrders(): void
{
$dependencyLoader = Mockery::mock('alias:' . RetailcrmDependencyLoader::class);
$dependencyLoader->shouldReceive('loadDependencies')->withAnyArgs()->andReturn(true);
COption::SetOptionString('intaro.retailcrm', \Intaro\RetailCrm\Component\Constants::CRM_SITES_LIST, serialize([]));
$rcrmActions = Mockery::mock('alias:' . RCrmActions::class);
$rcrmActions->shouldReceive('apiMethod')->withAnyArgs()->andReturn(true);
$result = RetailCrmOrder::uploadOrders();
self::assertTrue($result);
}
} }