add inventory admin fix, add procurement update
This commit is contained in:
@@ -33,14 +33,24 @@ $this->registerJs('inventoryItemIndex.init( '. json_encode($options) .' );');
|
||||
'name',
|
||||
['attribute'=>'id_user',
|
||||
'value'=>$model->userName
|
||||
],
|
||||
],
|
||||
['attribute'=>'id_account',
|
||||
'value'=>$model->accountName
|
||||
],
|
||||
['attribute'=>'status',
|
||||
'value'=>$model->getStatusHuman(),
|
||||
'label' => "Állapot"
|
||||
],
|
||||
'created_at:datetime',
|
||||
],
|
||||
]) ?>
|
||||
|
||||
<?php
|
||||
if ( $model->isOpen()){
|
||||
echo Html::a("Lezárás",['inventory/close' , 'id' => $model->id_inventory ] ,['data-method' =>'post', 'class' => 'btn btn-danger']);
|
||||
}
|
||||
?>
|
||||
|
||||
<?php echo $this->render('_search', ['model' => $searchModel]); ?>
|
||||
|
||||
|
||||
@@ -74,9 +84,8 @@ $this->registerJs('inventoryItemIndex.init( '. json_encode($options) .' );');
|
||||
</p>
|
||||
|
||||
<?php
|
||||
echo GridView::widget( [
|
||||
'dataProvider' => $dataProvider,
|
||||
'columns' =>[
|
||||
|
||||
$columns = [
|
||||
[
|
||||
'attribute' => 'item_created_at',
|
||||
'label' => 'Létrehozva',
|
||||
@@ -96,6 +105,16 @@ $this->registerJs('inventoryItemIndex.init( '. json_encode($options) .' );');
|
||||
'attribute' => 'inventory_prev_name',
|
||||
'label' => 'Utolsó leltár'
|
||||
|
||||
],
|
||||
[
|
||||
'attribute' => 'item_count_system',
|
||||
'label' => 'Rendszer szerinti mennyiség (db)',
|
||||
|
||||
],
|
||||
[
|
||||
'attribute' => 'item_count',
|
||||
'label' => 'Leltározott mennyiség (db)',
|
||||
|
||||
],
|
||||
[
|
||||
'attribute' => 'item_count_prev',
|
||||
@@ -111,24 +130,20 @@ $this->registerJs('inventoryItemIndex.init( '. json_encode($options) .' );');
|
||||
'attribute' => 'item_count_sold',
|
||||
'label' => 'Eladott mennyiség (db)',
|
||||
|
||||
],
|
||||
[
|
||||
'attribute' => 'item_count',
|
||||
'label' => 'Leltározott mennyiség (db)',
|
||||
|
||||
],
|
||||
[
|
||||
'attribute' => 'item_count_system',
|
||||
'label' => 'Rendszer szerinti mennyiség (db)',
|
||||
|
||||
],
|
||||
[
|
||||
'attribute' => 'item_difference',
|
||||
'label' => 'Különbség (db)',
|
||||
|
||||
],
|
||||
['class' => 'yii\grid\ActionColumn',
|
||||
'template' => '',
|
||||
|
||||
|
||||
];
|
||||
|
||||
if ( $model->isOpen() ){
|
||||
|
||||
$columns[] = ['class' => 'yii\grid\ActionColumn',
|
||||
'template' => '{update}',
|
||||
'urlCreator' => function ($action, $model, $key, $index){
|
||||
return Url::to(['inventory-item/update', 'id' => $model['item_id_inventory_item' ] ]) ;
|
||||
},
|
||||
@@ -141,8 +156,14 @@ $this->registerJs('inventoryItemIndex.init( '. json_encode($options) .' );');
|
||||
}
|
||||
]
|
||||
|
||||
]
|
||||
]
|
||||
] ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
echo GridView::widget( [
|
||||
'dataProvider' => $dataProvider,
|
||||
'columns' => $columns
|
||||
|
||||
]);
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user