From: marina Date: Wed, 18 Jun 2025 14:53:10 +0000 (+0300) Subject: правки X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=28c06232b596feaf94d2bac3e3e9263d7dfe17a1;p=erp24_rep%2Fyii-erp24%2F.git правки --- diff --git a/erp24/commands/CronController.php b/erp24/commands/CronController.php index d3b91b49..70351a11 100644 --- a/erp24/commands/CronController.php +++ b/erp24/commands/CronController.php @@ -1614,8 +1614,6 @@ class CronController extends Controller $week = $item['week']; $quantity = (float)($item['forecast_week_pieces'] ?? 0); - $this->stderr(implode("\n", $item), BaseConsole::FG_GREEN); - $details = []; $total = $quantity; diff --git a/erp24/web/js/autoplannogramma/autoplannogramma.js b/erp24/web/js/autoplannogramma/autoplannogramma.js index fa0cfa4d..79415357 100644 --- a/erp24/web/js/autoplannogramma/autoplannogramma.js +++ b/erp24/web/js/autoplannogramma/autoplannogramma.js @@ -388,7 +388,16 @@ function getMonthNumberByWeek(week, year) { return startMonth; } -const generateTitleString = (titleObj) => { +const safeParseJson = (str) => { + try { + return JSON.parse(str); + } catch { + return null; + } +}; + +const generateTitleString = (titleRaw) => { + const titleObj = typeof titleRaw === 'string' ? safeParseJson(titleRaw) : titleRaw; if (!titleObj || typeof titleObj !== 'object') return ''; const typeTitles = {