From: fomichev Date: Tue, 13 May 2025 12:43:59 +0000 (+0300) Subject: Вывод доп данных по неделям X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=02dab3c51dd4ea67b3face5f7567a627024875b3;p=erp24_rep%2Fyii-erp24%2F.git Вывод доп данных по неделям --- diff --git a/erp24/controllers/AutoPlannogrammaController.php b/erp24/controllers/AutoPlannogrammaController.php index de94a9ff..3d8f9b77 100644 --- a/erp24/controllers/AutoPlannogrammaController.php +++ b/erp24/controllers/AutoPlannogrammaController.php @@ -375,6 +375,10 @@ class AutoPlannogrammaController extends BaseController $monthCategoryShareResult[$species['store_id']][$species['category']][$species['subcategory']][$species['species']]['percent_of_month'] = $species['percent_of_month']; } + foreach ($weeksShareResult['weeksData'] as $row) { + $monthCategoryShareResult[$row['store_id']][$row['category']][$row['subcategory']][$row['species']][$row['week']]['sumWeek'] = $row['sumWeek']; + + } diff --git a/erp24/services/AutoPlannogrammaService.php b/erp24/services/AutoPlannogrammaService.php index 310deaa0..64cb910a 100644 --- a/erp24/services/AutoPlannogrammaService.php +++ b/erp24/services/AutoPlannogrammaService.php @@ -1177,6 +1177,7 @@ var_dump($totals); die(); 'category' => $cat, 'subcategory' => $sub, 'species' => $spec, + 'sumWeek' => $sumWeek, 'percent' => $percent, ]; } diff --git a/erp24/views/auto-plannogramma/control-species.php b/erp24/views/auto-plannogramma/control-species.php index 5adabfc4..0ce69abd 100644 --- a/erp24/views/auto-plannogramma/control-species.php +++ b/erp24/views/auto-plannogramma/control-species.php @@ -65,6 +65,7 @@ use yii_app\records\Products1c; Вид доля Вид Цель месяца Неделя + Сумма недели Доля недели (%) Цель недели @@ -86,6 +87,7 @@ use yii_app\records\Products1c; formatter->asPercent($monthCategoryShare[$model->storeId][$r['category']][$r['subcategory']][$r['species']]['percent_of_month'], 2) ?> неделя - начало + storeId][$r['category']][$r['subcategory']][$r['species']][$r['week']]['sumWeek'] ?>