From: fomichev Date: Fri, 30 May 2025 10:42:01 +0000 (+0300) Subject: Правки по количеству - расчет с раскрытием товаров X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=f5cb4ad323ec5f9fe36f420c7198fe2c1015ec56;p=erp24_rep%2Fyii-erp24%2F.git Правки по количеству - расчет с раскрытием товаров --- 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]], ], ]); ?>