From 2c4e8feb2b95e0e8788dac1cc7637d1ee2d51d14 Mon Sep 17 00:00:00 2001 From: Alexander Smirnov Date: Fri, 14 Feb 2025 12:42:38 +0300 Subject: [PATCH] =?utf8?q?=D0=B2=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D0=BD=D0=BE?= =?utf8?q?=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../MatrixStatisticsController.php | 7 +++ erp24/views/matrix-statistics/index.php | 48 +++++++++++++++++++ 2 files changed, 55 insertions(+) diff --git a/erp24/controllers/MatrixStatisticsController.php b/erp24/controllers/MatrixStatisticsController.php index 969c5fac..cbd605d8 100644 --- a/erp24/controllers/MatrixStatisticsController.php +++ b/erp24/controllers/MatrixStatisticsController.php @@ -9,6 +9,7 @@ use yii\web\Controller; use yii\web\Response; use yii_app\records\CityStore; use yii_app\records\CityStoreParams; +use yii_app\records\Sales; use yii_app\records\StoreDynamic; class MatrixStatisticsController extends Controller { @@ -33,6 +34,12 @@ class MatrixStatisticsController extends Controller { $model->load(Yii::$app->request->get()); + /////////////////////////////////////////// + $sales = Sales::find()->where(['operation' => Sales::OPERATION_SALE]) + ->andWhere(['>=', 'date', date($model->year . '-' . $model->month . '-01 00:00:00')]) + ->andWhere(['<=', 'date', date($model->year . '-' . $model->month . '-t 23:59:59')]) + ->all(); + /////////////////////////////////////////// $years = []; for ($i = 3; $i >= 0; $i--) { $year = date("Y") - $i; diff --git a/erp24/views/matrix-statistics/index.php b/erp24/views/matrix-statistics/index.php index 64ab08cd..12d558ed 100644 --- a/erp24/views/matrix-statistics/index.php +++ b/erp24/views/matrix-statistics/index.php @@ -145,4 +145,52 @@ $this->registerJsFile('/js/matrix-statistics/index.js', ['position' => \yii\web\ +
+
Сумма тотал
+
976 250 р
+
+
+
% цели магазина
+
27%
+
+
+
% цели матрицы
+
-3%
+
+ +
+
+
Сумма планируемых продаж
+
Доля группы матрицы
+
+
+
+
Базовая
+
231 250 р.
+
23%
+
+
+
+
Дополнительная
+
45 000 р.
+
4%
+
+
+
+
Изюмительная
+
700 000 р.
+
71%
+
+
+
+
Маркет Яндекс
+
0 р.
+
0 %
+
+
+
+
Маркет Флау
+
0 р.
+
0 %
+
-- 2.39.5