From f5cb4ad323ec5f9fe36f420c7198fe2c1015ec56 Mon Sep 17 00:00:00 2001 From: fomichev Date: Fri, 30 May 2025 13:42:01 +0300 Subject: [PATCH] =?utf8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=BF?= =?utf8?q?=D0=BE=20=D0=BA=D0=BE=D0=BB=D0=B8=D1=87=D0=B5=D1=81=D1=82=D0=B2?= =?utf8?q?=D1=83=20-=20=D1=80=D0=B0=D1=81=D1=87=D0=B5=D1=82=20=D1=81=20?= =?utf8?q?=D1=80=D0=B0=D1=81=D0=BA=D1=80=D1=8B=D1=82=D0=B8=D0=B5=D0=BC=20?= =?utf8?q?=D1=82=D0=BE=D0=B2=D0=B0=D1=80=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/controllers/AutoPlannogrammaController.php | 1 + erp24/services/AutoPlannogrammaService.php | 3 +++ erp24/views/auto-plannogramma/1.php | 6 ++++-- erp24/views/auto-plannogramma/3.php | 4 +++- erp24/views/auto-plannogramma/5.php | 4 +++- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/erp24/controllers/AutoPlannogrammaController.php b/erp24/controllers/AutoPlannogrammaController.php index 0fabb8d1..ad9bbc52 100644 --- a/erp24/controllers/AutoPlannogrammaController.php +++ b/erp24/controllers/AutoPlannogrammaController.php @@ -244,6 +244,7 @@ class AutoPlannogrammaController extends BaseController 'base_total_store' => $row['base_total_store'] ?? null, 'new_total_store' => $row['new_total_store'] ?? null, 'total_sum' => $row['total_sum'] ?? null, + 'old_total_sum' => $row['old_total_sum'] ?? null, 'percent' => $row['percent'] ?? null, ]; } diff --git a/erp24/services/AutoPlannogrammaService.php b/erp24/services/AutoPlannogrammaService.php index 214f4fea..8a9dd24d 100644 --- a/erp24/services/AutoPlannogrammaService.php +++ b/erp24/services/AutoPlannogrammaService.php @@ -217,6 +217,7 @@ class AutoPlannogrammaService $result[$sid][] = [ 'category' => $r['category'], + 'old_total_sum' => (float)$r['total_sum'], 'total_sum' => $newTotal, 'percent' => $percent, 'type' => $type, @@ -428,6 +429,7 @@ class AutoPlannogrammaService 'store_id' => $sid, 'category' => $cat, 'subcategory' => $subcat, + 'old_total_sum' => $subTotal, 'total_sum' => $newSubTotal, 'percent' => $percent, 'type' => $type, @@ -684,6 +686,7 @@ class AutoPlannogrammaService 'category' => $cat, 'subcategory' => $subcat, 'species' => $spec , + 'old_total_sum' => $specTotal, 'total_sum' => $newSpecTotal, 'percent' => $percent, 'type' => $type, diff --git a/erp24/views/auto-plannogramma/1.php b/erp24/views/auto-plannogramma/1.php index 2c89b151..cab06204 100644 --- a/erp24/views/auto-plannogramma/1.php +++ b/erp24/views/auto-plannogramma/1.php @@ -68,6 +68,7 @@ $dataProvider, + 'showPageSummary' => true, 'columns' => [ ['attribute' => 'store_id', 'label' => 'Магазин', 'value' => function ($data) { return CityStore::findOne($data['store_id'])->name ?? null; @@ -75,8 +76,9 @@ ['attribute' => 'category', 'label' => 'Категория'], ['attribute' => 'base_total_store', 'label' => 'Сумма продаж', 'format' => ['decimal', 2]], ['attribute' => 'new_total_store', 'label' => 'Сумма с Раскрытыми', 'format' => ['decimal', 2]], - ['attribute' => 'total_sum', 'label' => 'Сумма категории', 'format' => ['decimal', 2]], - ['attribute' => 'percent', 'label' => 'Доля', 'format' => ['percent', 2]], + ['attribute' => 'old_total_sum', 'label' => 'Сумма категории', 'format' => ['decimal', 2], 'pageSummary' => true,], + ['attribute' => 'total_sum', 'label' => 'Сумма категории с Раскрытыми', 'format' => ['decimal', 2], 'pageSummary' => true,], + ['attribute' => 'percent', 'label' => 'Доля', 'format' => ['percent', 2], 'pageSummary' => true,], ], ]); ?> diff --git a/erp24/views/auto-plannogramma/3.php b/erp24/views/auto-plannogramma/3.php index 22586e78..c3fa44f4 100644 --- a/erp24/views/auto-plannogramma/3.php +++ b/erp24/views/auto-plannogramma/3.php @@ -81,13 +81,15 @@ $dataProvider, + 'showPageSummary' => true, 'columns' => [ ['attribute' => 'store_id', 'label' => 'Магазин', 'value' => function ($data) { return CityStore::findOne($data['store_id'])->name ?? null; }], ['attribute' => 'category', 'label' => 'Категория'], ['attribute' => 'subcategory', 'label' => 'Подкатегория'], - ['attribute' => 'total_sum', 'label' => 'Сумма', 'format' => ['decimal', 2]], + ['attribute' => 'old_total_sum', 'label' => 'Сумма', 'format' => ['decimal', 2], 'pageSummary' => true,], + ['attribute' => 'total_sum', 'label' => 'Сумма с раскрытием', 'format' => ['decimal', 2], 'pageSummary' => true,], ['attribute' => 'percent', 'label' => 'Доля', 'format' => ['percent', 2]], ], ]); ?> diff --git a/erp24/views/auto-plannogramma/5.php b/erp24/views/auto-plannogramma/5.php index fc707197..6903b9b1 100644 --- a/erp24/views/auto-plannogramma/5.php +++ b/erp24/views/auto-plannogramma/5.php @@ -94,6 +94,7 @@ $dataProvider, + 'showPageSummary' => true, 'columns' => [ ['attribute' => 'store_id', 'label' => 'Магазин', 'value' => function ($data) { return CityStore::findOne($data['store_id'])->name ?? null; @@ -101,7 +102,8 @@ ['attribute' => 'category', 'label' => 'Категория'], ['attribute' => 'subcategory', 'label' => 'Подкатегория'], ['attribute' => 'species', 'label' => 'Тип'], - ['attribute' => 'total_sum', 'label' => 'Сумма', 'format' => ['decimal', 2]], + ['attribute' => 'old_total_sum', 'label' => 'Сумма', 'format' => ['decimal', 2], 'pageSummary' => true], + ['attribute' => 'total_sum', 'label' => 'Сумма с раскрытием', 'format' => ['decimal', 2], 'pageSummary' => true], ['attribute' => 'percent', 'label' => 'Доля', 'format' => ['percent', 2]], ], ]); ?> -- 2.39.5