]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Вывод доп данных для видов
authorfomichev <vladimir.fomichev@erp-flowers.ru>
Tue, 13 May 2025 12:14:43 +0000 (15:14 +0300)
committerfomichev <vladimir.fomichev@erp-flowers.ru>
Tue, 13 May 2025 12:14:43 +0000 (15:14 +0300)
erp24/controllers/AutoPlannogrammaController.php
erp24/views/auto-plannogramma/control-species.php

index babc6d2bdf0b8f787cb6ccbb633ba02166b85297..5a64004390c8f213f842b8f5a40a53993108480d 100644 (file)
@@ -363,7 +363,11 @@ class AutoPlannogrammaController extends BaseController
 
                 $monthSpeciesGoal = $service->getMonthSpeciesGoalDirty($monthSpeciesShare, $monthSubcategoryGoal);
             }
+            foreach ($monthSpeciesShare as $species) {
+                $monthCategoryShareResult[$species['store_id']][$species['category']][$species['subcategory']][$species['species']]['total_sum'] = $species['total_sum'];
+                $monthCategoryShareResult[$species['store_id']][$species['category']][$species['subcategory']][$species['species']]['percent_of_month'] = $species['percent_of_month'];
 
+            }
 
 
 
index e19017cf2277a0e0b47b2730aaa4955b4b986c3c..abd6f86b09b600f370ef4ac484a2eb0a2b1dbc0b 100644 (file)
@@ -103,6 +103,8 @@ use yii_app\records\Products1c;
                 <th>Подкатегория сумма</th>
                 <th>Подкатегория доля</th>
                 <th>Вид</th>
+                <th>Вид сумма</th>
+                <th>Вид доля</th>
                 <th>Неделя</th>
                 <th>Доля (%)</th>
                 <th>Цель месяца</th>
@@ -119,6 +121,8 @@ use yii_app\records\Products1c;
                     <td><?=  $monthCategoryShare[$model->storeId][$r['category']][$r['subcategory']]['total_sum'] ?>
                     <td><?=  Yii::$app->formatter->asPercent($monthCategoryShare[$model->storeId][$r['category']][$r['subcategory']]['percent_of_month'], 2) ?></td>
                     <td><?= Html::encode($r['species']) ?></td>
+                    <td><?=  $monthCategoryShare[$model->storeId][$r['category']][$r['subcategory']][$r['species']]['total_sum'] ?>
+                    <td><?=  Yii::$app->formatter->asPercent($monthCategoryShare[$model->storeId][$r['category']][$r['subcategory']][$r['species']]['percent_of_month'], 2) ?></td>
                     <td><?= $r['week'] ?>  неделя - начало <?= \yii_app\services\AutoPlannogrammaService::getIsoWeekStart((int)date('Y'), (int)$r['week']) ?></td>
                     <td>
                         <?php if ($r['percent'] === null): ?>