From 9981ee6b42d78f8c6f86571f604b9117d5617fc6 Mon Sep 17 00:00:00 2001 From: Vladimir Fomichev Date: Fri, 4 Jul 2025 11:35:54 +0300 Subject: [PATCH] =?utf8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD?= =?utf8?q?=D0=B8=D0=B5=20$auto=5Fforecast?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/commands/CronController.php | 1 + erp24/controllers/CategoryPlanController.php | 6 ++++++ erp24/web/js/category-plan/index.js | 1 + 3 files changed, 8 insertions(+) diff --git a/erp24/commands/CronController.php b/erp24/commands/CronController.php index 70ffee7c..22f012bb 100644 --- a/erp24/commands/CronController.php +++ b/erp24/commands/CronController.php @@ -1713,6 +1713,7 @@ class CronController extends Controller 'product_id' => $productId, 'store_id' => $store->id, 'is_archive' => false, + 'auto_forecast' => true, 'capacity_type' => 1, 'details' => json_encode($details, JSON_UNESCAPED_UNICODE), 'calculate' => $quantity, diff --git a/erp24/controllers/CategoryPlanController.php b/erp24/controllers/CategoryPlanController.php index 275fcf75..fe18bf81 100644 --- a/erp24/controllers/CategoryPlanController.php +++ b/erp24/controllers/CategoryPlanController.php @@ -263,6 +263,7 @@ class CategoryPlanController extends Controller { 'month' => $model->month, 'storeId' => $model->store_id, 'status' => 'pending', + 'info' => 'auto', 'startTime' => date('Y-m-d H:i:s'), 'progress' => 0, 'error' => null @@ -275,6 +276,7 @@ class CategoryPlanController extends Controller { $log->context = json_encode($cacheValue, JSON_UNESCAPED_UNICODE); $log->year = (int)$cacheValue['year']; $log->month = (int)$cacheValue['month']; + $log->info = $cacheValue['info']; $log->active = 1; $log->progress = 0; $log->status = 1; @@ -606,6 +608,8 @@ class CategoryPlanController extends Controller { $year = (int)Yii::$app->request->get('year'); $month = (int)Yii::$app->request->get('month'); $store = (int)Yii::$app->request->get('store_id'); + $changes = (int)Yii::$app->request->get('changes'); + var_dump($year, $month, $store, $changes); die(); $taskName = "taskApRecalculate"; $scriptLauncherLog = ScriptLauncherLog::find() ->andWhere(['name' => $taskName]) @@ -621,6 +625,7 @@ class CategoryPlanController extends Controller { 'year' => $year, 'month' => $month, 'storeId' => $store, + 'info' => 'corrected', 'status' => 'pending', 'startTime' => date('Y-m-d H:i:s'), 'progress' => 0, @@ -631,6 +636,7 @@ class CategoryPlanController extends Controller { $log->category = 'autoplannogramma'; $log->prefix = 'actionAutoplannogrammaRecalculate'; $log->name = $taskName; + $log->info = $cacheValue['info']; $log->context = json_encode($cacheValue, JSON_UNESCAPED_UNICODE); $log->year = (int)$cacheValue['year']; $log->month = (int)$cacheValue['month']; diff --git a/erp24/web/js/category-plan/index.js b/erp24/web/js/category-plan/index.js index a613d116..be55dbde 100644 --- a/erp24/web/js/category-plan/index.js +++ b/erp24/web/js/category-plan/index.js @@ -222,6 +222,7 @@ $(document).ready(() => { year: $('#dynamicmodel-year').val(), month: $('#dynamicmodel-month').val(), store_id: store_id, + changes: localStorage.getItem('planChanges'), [param26]: token26 }, success: function (data) { -- 2.39.5