From: Alexander Smirnov Date: Fri, 14 Feb 2025 09:42:38 +0000 (+0300) Subject: временное X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=2c4e8feb2b95e0e8788dac1cc7637d1ee2d51d14;p=erp24_rep%2Fyii-erp24%2F.git временное --- 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 %
+