From: Vladimir Fomichev Date: Fri, 25 Jul 2025 10:36:18 +0000 (+0300) Subject: Merge branch 'refs/heads/develop' into feature_fomichev_erp-362_export_to_excel_autop... X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=bb38ed111f058b8fd06adfc7e9dc27950c568936;p=erp24_rep%2Fyii-erp24%2F.git Merge branch 'refs/heads/develop' into feature_fomichev_erp-362_export_to_excel_autoplannogram # Conflicts: # erp24/services/AutoPlannogrammaService.php --- bb38ed111f058b8fd06adfc7e9dc27950c568936 diff --cc erp24/commands/CronController.php index be265d5a,4fb58019..fb586534 --- a/erp24/commands/CronController.php +++ b/erp24/commands/CronController.php @@@ -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) diff --cc erp24/services/AutoPlannogrammaService.php index 0ecac3ef,39751ab9..12f0cb06 --- a/erp24/services/AutoPlannogrammaService.php +++ b/erp24/services/AutoPlannogrammaService.php @@@ -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])) {