From 83f6d7eec95ef01d1ecd78100fec20cf103334e6 Mon Sep 17 00:00:00 2001 From: marina Date: Tue, 17 Jun 2025 12:25:38 +0300 Subject: [PATCH] =?utf8?q?ERP-360=20=D0=A1=D0=B1=D0=BE=D1=80=D0=BA=D0=B0?= =?utf8?q?=20=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86=D1=8B=20=D0=B0?= =?utf8?q?=D0=B2=D1=82=D0=BE=D0=BF=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/controllers/AutoPlannogrammaController.php | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/erp24/controllers/AutoPlannogrammaController.php b/erp24/controllers/AutoPlannogrammaController.php index 308659f7..fc8b48ec 100644 --- a/erp24/controllers/AutoPlannogrammaController.php +++ b/erp24/controllers/AutoPlannogrammaController.php @@ -210,7 +210,6 @@ class AutoPlannogrammaController extends BaseController foreach ($result as $productId => &$productData) { foreach ($productData['values'] as &$value) { $storeId = $value['store_id']; - $group = $value['group']; $quantity = $value['quantity']; $value['title'] = []; @@ -218,21 +217,15 @@ class AutoPlannogrammaController extends BaseController continue; } - if (isset($forecast[$storeId][$productId])) { - foreach (['offline', 'marketplace', 'online'] as $channel) { - if ( - isset($forecast[$storeId][$productId][$channel][$group]) && - is_numeric($forecast[$storeId][$productId][$channel][$group]) - ) { - $coef = $forecast[$storeId][$productId][$channel][$group]; - $value['title'][$channel] = round($quantity * $coef, 2); - } + foreach (['offline', 'marketplace', 'online'] as $channel) { + if (isset($forecast[$storeId][$channel]['share']) && is_numeric($forecast[$storeId][$channel]['share'])) { + $coef = $forecast[$storeId][$channel]['share']; + $value['title'][$channel] = round($quantity * $coef, 2); } } } } - return array_values($result); } -- 2.39.5