fitness-web/backend/views/procurement/index.php
2015-09-25 17:25:16 +02:00

57 lines
1.3 KiB
PHP

<?php
use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel backend\models\ProcurementSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Yii::t('common/procurement', 'Procurements');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="procurement-index">
<h1><?= Html::encode($this->title) ?></h1>
<?php echo $this->render('_search', [
'model' => $searchModel,
'users' => $users,
'products' => $products,
'warehouses' => $warehouses,]); ?>
<p>
<?= Html::a(Yii::t('common/procurement', 'Create Procurement'), ['create'], ['class' => 'btn btn-success']) ?>
</p>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
[
'attribute' => 'id_warehouse',
'value' => 'wareHouseName'
],
[
'attribute' => 'id_user',
'value' => 'userName'
],
[
'attribute' => 'id_product',
'value' => 'productName'
],
'count',
'stock',
'purchase_price',
'created_at:datetime',
[
'class' => 'yii\grid\ActionColumn',
'template' => '{view}',
],
],
]); ?>
</div>