From: Vladimir Fomichev Date: Thu, 4 Sep 2025 10:26:15 +0000 (+0300) Subject: Добавление ссылок на матрицу из отчета X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=b8009fda52e93297ef761907fb9317ccd5f84778;p=erp24_rep%2Fyii-erp24%2F.git Добавление ссылок на матрицу из отчета --- diff --git a/erp24/views/marketplace/report.php b/erp24/views/marketplace/report.php index 8220f042..bc211e94 100644 --- a/erp24/views/marketplace/report.php +++ b/erp24/views/marketplace/report.php @@ -78,7 +78,20 @@ $this->params['breadcrumbs'][] = $this->title; $columns = [ ['class' => 'yii\grid\SerialColumn'], 'name', - 'articule', + [ 'format' => 'raw', + 'attribute' => 'articule', + 'label' => 'Актикул', + 'value' => function ($model) { + + $matrixProductId = \yii_app\records\MatrixErp::find() + ->select('id') + ->where(['guid' => $model['id']])->scalar(); + /*$link = '' + . $model['articule'] . '';*/ + $link = Html::a($model['articule'], ['/matrix-erp/update', 'id' => $matrixProductId], ['target' => '_blank', 'encode' => false]); + return $link; + } + ], 'id', [ 'attribute' => 'is_valid',