From 6e09efd1d2049acd13c5196718cf91b004398470 Mon Sep 17 00:00:00 2001 From: Alexander Smirnov Date: Wed, 22 Jan 2025 14:05:54 +0300 Subject: [PATCH] =?utf8?q?[ERP-283]=20=D0=BF=D0=BB=D0=B0=D0=BD=D1=8B=20?= =?utf8?q?=D0=B2=D0=B7=D1=8F=D1=82=D1=8B=20=D0=B8=D0=B7=20/sales-write-off?= =?utf8?q?s-plan?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/controllers/CategoryPlanController.php | 5 +++- erp24/views/category-plan/index.php | 28 +++++++++++++------- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/erp24/controllers/CategoryPlanController.php b/erp24/controllers/CategoryPlanController.php index 80fdfaaf..69f8de5a 100644 --- a/erp24/controllers/CategoryPlanController.php +++ b/erp24/controllers/CategoryPlanController.php @@ -9,6 +9,7 @@ use yii\web\Controller; use yii_app\records\CityStore; use yii_app\records\ExportImportTable; use yii_app\records\Sales; +use yii_app\records\SalesWriteOffsPlan; use yii_app\records\WriteOffs; use yii_app\records\WriteOffsErp; @@ -116,6 +117,8 @@ class CategoryPlanController extends Controller { $types = array_keys($types); ///////////////////////////////////////////////////////////////////////////////////// + $salesWriteOffsPlan = SalesWriteOffsPlan::find()->where(['year' => $model->year, 'month' => $model->month, 'store_id' => $model->store_id])->one(); + $years = []; for ($i = 3; $i >= 0; $i--) { $year = date("Y") - $i; @@ -124,6 +127,6 @@ class CategoryPlanController extends Controller { $stores = ArrayHelper::map(CityStore::find()->andWhere(['visible' => '1'])->all(), 'id', 'name'); return $this->render('index', compact('model', 'years', 'stores', 'table', 'tableOnline', - 'tableWriteOffs', 'types')); + 'tableWriteOffs', 'types', 'salesWriteOffsPlan')); } } diff --git a/erp24/views/category-plan/index.php b/erp24/views/category-plan/index.php index 3df10e13..a86f2dff 100644 --- a/erp24/views/category-plan/index.php +++ b/erp24/views/category-plan/index.php @@ -5,7 +5,7 @@ use yii\widgets\ActiveForm; use kartik\select2\Select2; use yii_app\helpers\HtmlHelper; - +use yii_app\records\SalesWriteOffsPlan; /* @var $model DynamicModel */ /* @var $years array */ @@ -14,6 +14,7 @@ use yii_app\helpers\HtmlHelper; /* @var $tableOnline array */ /* @var $types array */ /* @var $tableWriteOffs array */ +/* @var $salesWriteOffsPlan SalesWriteOffsPlan */ $this->registerJsFile('/js/category-plan/index.js', ['position' => \yii\web\View::POS_END]); @@ -61,26 +62,33 @@ $this->registerJsFile('/js/category-plan/index.js', ['position' => \yii\web\View store_id)): ?>
+ offline_sales_plan; + $online_sale = $salesWriteOffsPlan->online_sales_shop_plan; + $write_offs = $salesWriteOffsPlan->write_offs_plan; + ?> - - - - + + + + + + store_id][$type] ?? 0; ?> - + store_id][$type] ?? 0; ?> - + - - + - + -- 2.39.5
КатегорииПлан продажСписания
ОффлайнИнтернет-МагазинМаркетплейсСписания
1 100 000800 0000300 000
%Сумма%Cумма%Cумма%Cумма
КатегорииПлан продажСписания
ОффлайнИнтернет-МагазинСписания
%Сумма%Cумма%Cумма
%% %% %%