model->isTypeOpen() ){ $attributes = [ [ 'attribute' =>'account.name', 'label' => 'Kassza' ], [ 'attribute' =>'typeName', 'label' => 'Típus' ], [ 'attribute' =>'money', 'value' => \Yii::$app->formatter->asInteger($this->model->money) ." Ft", ], 'user.username', [ 'attribute' => 'created_at', 'label' => 'Nyitás ideje', 'format' => 'datetime' ], ]; }else{ $attributes = [ [ 'attribute' =>'account.name', 'label' => 'Kassza' ], [ 'attribute' =>'typeName', 'label' => 'Típus' ], [ 'attribute' =>'money', 'value' => \Yii::$app->formatter->asInteger($this->model->money) ." Ft", ], [ 'attribute' => 'non_cash_money', 'label' => 'Készpénz alapú forgalom', 'value' => \Yii::$app->formatter->asInteger($this->model->collection_money) ." Ft", ], [ 'attribute' => 'non_cash_money', 'label' => 'Nem készpénz alapú forgalom', 'value' => \Yii::$app->formatter->asInteger($this->model->non_cash_money) ." Ft", ], 'user.username', [ 'attribute' => 'start_date', 'label' => 'Előző nyitás ideje' , 'format' => 'datetime' ], [ 'attribute' => 'created_at', 'label' => 'Zárás ideje', 'format' => 'datetime' ], ]; } echo DetailView::widget([ 'options' => ['class' => 'table table-striped table-bordered detail-view table-account-view'] , 'model' => $this->model, 'attributes' =>$attributes, ]) ; } }