diff --git a/views/cashbook/index.php b/views/cashbook/index.php index c1c5182..4f0b32f 100644 --- a/views/cashbook/index.php +++ b/views/cashbook/index.php @@ -52,14 +52,16 @@ // }, 'columns' => [ [ - //'label' => 'Dia', 'attribute' => 'date', 'enableSorting' => true, - 'format' => ['date', 'php:d/m/Y'], + //'format' => ['date', 'php:d/m/Y'], + //'value' => Yii::$app->formatter->asDate($model->date, 'short'), + 'value' => function ($model) { + return $model->date <> '' ? Yii::$app->formatter->asDate($model->date, 'short') : Yii::$app->formatter->asDate($model->date, 'short'); + }, 'contentOptions'=>['style'=>'width: 10%;text-align:left'], ], [ - //'label' => 'Categoria', 'attribute' => 'category_id', 'format' => 'raw', 'enableSorting' => true, @@ -120,16 +122,6 @@ 'footer' => Cashbook::pageTotal($dataProvider->models,'value'), 'footerOptions' => ['style'=>'text-align:right'], ], - //'id', - //'category_id', - //'type_id', - //'value', - //'description', - // 'date', - // 'is_pending', - // 'attachment', - // 'inc_datetime', - // 'edit_datetime', ], ]); ?> diff --git a/views/cashbook/view.php b/views/cashbook/view.php index 778eeef..5a5ee2c 100644 --- a/views/cashbook/view.php +++ b/views/cashbook/view.php @@ -50,7 +50,6 @@ 'value' => $model->type->desc_type, ], [ - //'label' => 'Categoria', 'attribute' => 'category_id', 'value' => $model->category->desc_category, ], @@ -68,12 +67,10 @@ [ 'attribute' => 'inc_datetime', 'value' => Yii::$app->formatter->asDate($model->inc_datetime, 'long'), - //'inc_datetime:datetime', - // 'format' => ['date', 'd/M/Y H:m:s'], ], [ 'attribute' => 'edit_datetime', - 'value' => Yii::$app->formatter->asDate($model->inc_datetime, 'short'), + 'value' => Yii::$app->formatter->asDate($model->inc_datetime, 'long'), //'format' => ['date', 'd/M/Y H:m:s'], ], ],