]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
правки
authormarina <m.zozirova@gmail.com>
Wed, 18 Jun 2025 14:53:10 +0000 (17:53 +0300)
committermarina <m.zozirova@gmail.com>
Wed, 18 Jun 2025 14:53:10 +0000 (17:53 +0300)
erp24/commands/CronController.php
erp24/web/js/autoplannogramma/autoplannogramma.js

index d3b91b498a8185f52e09b17c06dc17e1b89ce60e..70351a11887b7d64733740fc24384f5808d88faf 100644 (file)
@@ -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;
 
index fa0cfa4d215120a7a37175050ee90cfaabf3ed62..79415357dfe19fdb8116f34d1b351f1ee4d97ad1 100644 (file)
@@ -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 = {