add changes to procurement
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\grid\GridView;
|
||||
use yii\helpers\Url;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $searchModel backend\models\ProductSearch */
|
||||
@@ -41,9 +42,31 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
'value' => 'statusHuman',
|
||||
|
||||
],
|
||||
|
||||
['class' => 'yii\grid\ActionColumn',
|
||||
'template' => '{view} {update}'
|
||||
'stock',
|
||||
[
|
||||
'class' => 'yii\grid\ActionColumn',
|
||||
'template' => '{view} {update} {procurement}',
|
||||
'buttons' =>[
|
||||
'view' => function ($url, $model, $key) {
|
||||
return Html::a( Yii::t('common/product', 'Details' ), $url,[ 'class' => 'btn btn-xs btn-success' ]) ;
|
||||
},
|
||||
'update' => function ($url, $model, $key) {
|
||||
return Html::a( Yii::t('common/product', 'Update' ), $url,[ 'class' => 'btn btn-xs btn-success' ]) ;
|
||||
},
|
||||
'procurement' => function ($url, $model, $key) {
|
||||
return Html::a( Yii::t('common/product', 'Procurement' ), $url,[ 'class' => 'btn btn-xs btn-success' ]) ;
|
||||
},
|
||||
],
|
||||
'urlCreator' => function ( $action, $model, $key, $index ){
|
||||
$result = '';
|
||||
if ( $action == 'procurement' ){
|
||||
$result = Url::toRoute(['procurement/create-product' , 'id' => $model->id_product]);
|
||||
}else{
|
||||
$result = Url::toRoute(['product/'.$action , 'id' => $model->id_product]);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
],
|
||||
],
|
||||
]); ?>
|
||||
|
||||
@@ -29,6 +29,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
'sale_price',
|
||||
'profit_margins',
|
||||
'statusHuman',
|
||||
'stock',
|
||||
[
|
||||
'attribute' => 'description',
|
||||
'value' => nl2br($model->description),
|
||||
|
||||
Reference in New Issue
Block a user