]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Merge branch 'refs/heads/develop' into feature_fomichev_erp-362_export_to_excel_autop...
authorVladimir Fomichev <vladimir.fomichev@erp-flowers.ru>
Fri, 25 Jul 2025 10:36:18 +0000 (13:36 +0300)
committerVladimir Fomichev <vladimir.fomichev@erp-flowers.ru>
Fri, 25 Jul 2025 10:36:18 +0000 (13:36 +0300)
# Conflicts:
# erp24/services/AutoPlannogrammaService.php

1  2 
erp24/commands/CronController.php
erp24/controllers/AutoPlannogrammaController.php
erp24/services/AutoPlannogrammaService.php

index be265d5a078700c1fc8ecfac127edb1064adef27,4fb58019fa5f670c4b52989b47dde6f7c3d385b1..fb5865348abd8bebcf9f510ee71c0bcbc857158f
@@@ -1693,8 -1765,9 +1765,9 @@@ class CronController extends Controlle
                              'product_id' => $productId,
                              'store_id' => $store->id,
                              'is_archive' => false,
+                             'auto_forecast' => true,
                              'capacity_type' => 1,
 -                            'details' => json_encode($details, JSON_UNESCAPED_UNICODE),
 +                            'details' => json_encode($details, JSON_UNESCAPED_UNICODE), // TODO двойное кодирование
                              'calculate' => $quantity,
                              'modify' => ceil($total),
                              'total' => ceil($total)
index 0ecac3eff82acb296e0a6ab660e5eebbd9c098ee,39751ab9de856b62dfef51cd3f45fdea656f61d4..12f0cb06d6239ffe707015f322cd7f3f6fa68029
@@@ -3018,13 -3121,10 +3121,12 @@@ class AutoPlannogrammaServic
                  $salesShares[$storeId]['marketplace'] = round($market / $total, 4);
              }
          }
          foreach ($weeklyForecasts as $item) {
 +            $groupsArr = explode('_', (string)$item['matrix_group']);
 +            $baseGroup = $groupsArr[0];
              $storeItem = (int)$item['store_id'];
              $guid = (string)$item['product_guid'];
 -            $group = (string)$item['matrix_group'];
 +            $group = $baseGroup;
              $type = (string)$item['type'];
              $forecastValue = (float)$item['week_forecast'];
              if (isset($salesShares[$storeItem]) && isset($salesShares[$storeItem][$type])) {