From d79edb9e2e0860fa783a4bb55d9d0d6979ce251f Mon Sep 17 00:00:00 2001 From: fomichev Date: Thu, 22 May 2025 15:34:15 +0300 Subject: [PATCH] =?utf8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=B8=D0=BC=D0=B5=D0=BD?= =?utf8?q?=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=BC=D0=B5=D1=82=D0=BE?= =?utf8?q?=D0=B4=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/controllers/AutoPlannogrammaController.php | 10 +++++----- erp24/services/AutoPlannogrammaService.php | 2 +- .../{control-species.php => control-species.phpld} | 0 3 files changed, 6 insertions(+), 6 deletions(-) rename erp24/views/auto-plannogramma/{control-species.php => control-species.phpld} (100%) diff --git a/erp24/controllers/AutoPlannogrammaController.php b/erp24/controllers/AutoPlannogrammaController.php index 0164aeae..3b8c3bf6 100644 --- a/erp24/controllers/AutoPlannogrammaController.php +++ b/erp24/controllers/AutoPlannogrammaController.php @@ -93,7 +93,7 @@ class AutoPlannogrammaController extends BaseController if (!empty($filters['plan_date'])) { $service = new AutoPlannogrammaService(); $dataProvider = new ArrayDataProvider([ - 'allModels' => $service->calculateFullGoalChain($filters), + 'allModels' => $service->calculateFullGoalChainWeighted($filters), 'pagination' => ['pageSize' => 100], ]); } @@ -210,7 +210,7 @@ class AutoPlannogrammaController extends BaseController } - public function actionControlSpecies() + public function actionControlSpeciesOld() { $model = new DynamicModel([ 'storeId', 'month', 'type', @@ -268,7 +268,7 @@ class AutoPlannogrammaController extends BaseController - $monthSpeciesGoals = $service->calculateFullGoalChain($filters); + $monthSpeciesGoals = $service->calculateFullGoalChainWeighted($filters); $monthSpeciesGoalsMap = []; foreach ($monthSpeciesGoals as $monthSpeciesGoal) { $monthSpeciesGoalsMap[$monthSpeciesGoal['store_id']] @@ -412,11 +412,11 @@ class AutoPlannogrammaController extends BaseController } //var_dump($weeksProductForecast); die(); - return $this->render('control-species', [ + return $this->render('control-species-old', [ 'model' => $model, 'result' => $monthResult, 'weeksData' => $weeksData, - 'monthCategoryShare' => $monthCategoryShareResult, + 'monthCategoryShare' => $monthCategoryShareResult, 'weeksProductForecast' => $weeksProductForecast, 'totals' => $totals, 'storeList' => $storeList, diff --git a/erp24/services/AutoPlannogrammaService.php b/erp24/services/AutoPlannogrammaService.php index f483248f..7a67d262 100644 --- a/erp24/services/AutoPlannogrammaService.php +++ b/erp24/services/AutoPlannogrammaService.php @@ -351,7 +351,7 @@ var_dump($totals); die(); return $result; } - public function calculateFullGoalChain(array $filters): array + public function calculateFullGoalChainWeighted(array $filters): array { $datePlan = $filters['plan_date']; $dateFromForCategory = (new \DateTime($datePlan))->modify('-12 months')->format('Y-m-d'); diff --git a/erp24/views/auto-plannogramma/control-species.php b/erp24/views/auto-plannogramma/control-species.phpld similarity index 100% rename from erp24/views/auto-plannogramma/control-species.php rename to erp24/views/auto-plannogramma/control-species.phpld -- 2.39.5