From 7884f46bd546e86aa8e7398b6b2f488812bb50a6 Mon Sep 17 00:00:00 2001 From: Vladimir Fomichev Date: Mon, 29 Sep 2025 10:45:01 +0300 Subject: [PATCH] =?utf8?q?=D0=A3=D0=B1=D1=80=D0=B0=D0=BB=20=D0=BF=D1=80?= =?utf8?q?=D0=BE=D0=B1=D0=B5=D0=BB=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/controllers/AutoPlannogrammaController.php | 5 ----- erp24/services/AutoPlannogrammaService.php | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/erp24/controllers/AutoPlannogrammaController.php b/erp24/controllers/AutoPlannogrammaController.php index 3f35f9f8..234270ed 100644 --- a/erp24/controllers/AutoPlannogrammaController.php +++ b/erp24/controllers/AutoPlannogrammaController.php @@ -1367,14 +1367,9 @@ class AutoPlannogrammaController extends BaseController $service = new AutoPlannogrammaService(); //$goals = $service->calculateFullGoalChain($filters); //$forecast = $service->calculateFullForecastForWeek($filters); - //$noHistoryProductData = $service->calculateSpeciesForecastForProductsWithoutHistory($filters['plan_date'], $filters); - $monthCategoryShare = $service->getMonthCategoryShareOrWriteOff($filters['plan_date'], $filters); - $monthCategoryGoal = $service->getMonthCategoryGoal($monthCategoryShare, $filters['plan_date']); - $monthSubcategoryShare = $service->getMonthSubcategoryShareOrWriteOff($filters['plan_date'], $filters); - $monthSubcategoryGoal = $service->getMonthSubcategoryGoal($monthSubcategoryShare, $monthCategoryGoal); $monthSpeciesShare = $service->getMonthSpeciesShareOrWriteOff($filters['plan_date'], $filters); $goals = $service->getMonthSpeciesGoalDirty($monthSpeciesShare, $monthSubcategoryGoal); diff --git a/erp24/services/AutoPlannogrammaService.php b/erp24/services/AutoPlannogrammaService.php index ad601c8c..a6eef77d 100644 --- a/erp24/services/AutoPlannogrammaService.php +++ b/erp24/services/AutoPlannogrammaService.php @@ -1400,9 +1400,9 @@ private function buildCategoryGoals(array $rawGoals, bool $subtractMatrix, int $ } if ($sumPercent < 1.0) { - $diff = 1.0 - round($sumPercent, 4); + $diff = 1.0 - round($sumPercent, 4); $count = count($indices); - $add = round($diff / $count, 4); + $add = round($diff / $count, 4); foreach ($indices as $i) { $result[$i]['share'] = round($result[$i]['share'] + $add, 6); } -- 2.39.5