diff --git a/backend/views/inventory-item/index.php b/backend/views/inventory-item/index.php index 2a1b17c..a5b2718 100644 --- a/backend/views/inventory-item/index.php +++ b/backend/views/inventory-item/index.php @@ -9,6 +9,7 @@ use backend\assets\InventoryItemIndexAsset; /* @var $this yii\web\View */ /* @var $searchModel backend\models\InventoryItemSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ +/* @var $model \common\models\Inventory */ $this->title = Yii::t('common/inventory-item', 'Leltár részletei'); $this->params['breadcrumbs'][] = $this->title; @@ -19,177 +20,162 @@ InventoryItemIndexAsset::register($this); $options = []; $options['products'] = $productOptions; -$this->registerJs('inventoryItemIndex.init( '. json_encode($options) .' );'); +$this->registerJs('inventoryItemIndex.init( ' . json_encode($options) . ' );'); ?> -
+ Magyarázat: +
+ 'xls']), ['class' => 'btn btn-primary']) ?> +
+ 'item_name', + 'label' => 'Név', + + ], + [ + 'attribute' => 'inventory_prev_name', + 'label' => 'Utolsó leltár' + ], + [ + 'attribute' => 'item_count_system', + 'label' => 'Rendszer szerinti mennyiség (db)', + 'contentOptions' => ['class' => 'numeric'] + + ], + [ + 'attribute' => 'item_count', + 'label' => 'Leltározott mennyiség (db)', + 'contentOptions' => ['class' => 'numeric'] + + ], + [ + 'attribute' => 'item_count_prev', + 'label' => 'Előzö leltár (db)', + 'contentOptions' => ['class' => 'numeric'] + + ], + [ + 'attribute' => 'item_count_in', + 'label' => 'Beszerzett mennyiség (db)', + 'contentOptions' => ['class' => 'numeric'] + + ], + [ + 'attribute' => 'item_count_sold', + 'label' => 'Eladott mennyiség (db)', + 'contentOptions' => ['class' => 'numeric'] + + ], + [ + 'attribute' => 'item_difference', + 'label' => 'Különbség (db)', + 'contentOptions' => ['class' => 'numeric'] + + ], + [ + 'attribute' => 'item_price_brutto', + 'label' => 'Eladási ár (Ft)', + 'contentOptions' => ['class' => 'numeric'] + ], + [ + 'attribute' => 'item_total_price_brutto', + 'label' => 'Összeg (Ft)', + 'contentOptions' => ['class' => 'numeric'] + ], - -- Magyarázat: -
- 'xls']),['class' =>'btn btn-primary'])?> -
- - 'item_name', - 'label' => 'Név', - - ], - [ - 'attribute' => 'inventory_prev_name', - 'label' => 'Utolsó leltár' - ], - [ - 'attribute' => 'item_count_system', - 'label' => 'Rendszer szerinti mennyiség (db)', - 'contentOptions' => ['class' => 'numeric'] - - ], - [ - 'attribute' => 'item_count', - 'label' => 'Leltározott mennyiség (db)', - 'contentOptions' => ['class' => 'numeric'] - - ], - [ - 'attribute' => 'item_count_prev', - 'label' => 'Előzö leltár (db)', - 'contentOptions' => ['class' => 'numeric'] - - ], - [ - 'attribute' => 'item_count_in', - 'label' => 'Beszerzett mennyiség (db)', - 'contentOptions' => ['class' => 'numeric'] - - ], - [ - 'attribute' => 'item_count_sold', - 'label' => 'Eladott mennyiség (db)', - 'contentOptions' => ['class' => 'numeric'] - - ], - [ - 'attribute' => 'item_difference', - 'label' => 'Különbség (db)', - 'contentOptions' => ['class' => 'numeric'] - - ], - [ - 'attribute' => 'item_price_brutto', - 'label' => 'Eladási ár (Ft)', - 'contentOptions' => ['class' => 'numeric'] - ], - [ - 'attribute' => 'item_total_price_brutto', - 'label' => 'Összeg (Ft)', - 'contentOptions' => ['class' => 'numeric'] - ], - - - ]; - - 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' ] ]) ; - }, - 'buttons' =>[ - 'update' =>function ($url, $model, $key) { - return Html::a('Módosítás', $url,['class' => 'btn btn-xs btn-success', - 'data' => [ - ], - ]) ; - } - ], - 'urlCreator' => function($action, $model, $key, $index){ - $result = ""; - if ( $action == 'update'){ - $result = Url::toRoute( [ 'update-item' ,'id' => $model['item_id_inventory_item']]); - } - return $result; - } - ] ; - } - - echo GridView::widget( [ - 'dataProvider' => $dataProvider, - 'columns' => $columns - ]); - ?> + echo GridView::widget([ + 'dataProvider' => $dataProvider, + 'columns' => $columns + ]); + ?>