From 924176ada8f2bc706a0a86e4b6168ed20275e8b1 Mon Sep 17 00:00:00 2001 From: Vladimir Fomichev Date: Sat, 1 Nov 2025 16:28:19 +0300 Subject: [PATCH] =?utf8?q?=D1=83=D0=B1=D0=B8=D1=80=D0=B0=D0=B5=D0=BC=20?= =?utf8?q?=D0=B4=D1=83=D0=B1=D0=BB=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD?= =?utf8?q?=D0=B8=D0=B5=20=D0=B0=D0=B4=D0=BC=D0=B8=D0=BD=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/api3/core/services/ReportService.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/erp24/api3/core/services/ReportService.php b/erp24/api3/core/services/ReportService.php index 647dd5ff..e6188d0a 100644 --- a/erp24/api3/core/services/ReportService.php +++ b/erp24/api3/core/services/ReportService.php @@ -359,6 +359,11 @@ class ReportService 'shift_id' => $timetable['shift_id'], ]; } + + // Преобразуем индексированный массив обратно в обычный для совместимости с остальным кодом + foreach ($adminNames as $storeId => $admins) { + $adminNames[$storeId] = array_values($admins); + } $storeVisitorsQuantityTotal = 0; $storeSaleQuantityTotal = 0; @@ -427,6 +432,7 @@ class ReportService $adminRecord["bonus_new_user_count"] = (int)($storeSaleByAdminId[$adminRecord['id']]['newBonusUserCount'] ?? 0); $adminRecord["bonus_repeat_user_count"] = (int)($storeSaleByAdminId[$adminRecord['id']]['repeatBonusUserCount'] ?? 0); } + unset($adminRecord); // Освобождаем ссылку после цикла } $totalWriteOffsPerDate = (int)($totalWriteOffsByStoreId[$store->id] ?? 0); @@ -450,6 +456,7 @@ class ReportService $adminRecord["total_" . $spec . "_per_day_percent"] = 0; } } + unset($adminRecord); // Освобождаем ссылку после цикла } foreach ($specificSales[$spec] as $specificSale) { if ($specificSale['store_id'] == $store->id) { @@ -464,6 +471,7 @@ class ReportService } } } + unset($adminRecord); // Освобождаем ссылку после цикла } } } -- 2.39.5