<?php // echo $this->render('_search', ['model' => $searchModel]); ?> <p> <?php echo Html::button('Tambah Data', ['class' => 'btn btn-success', 'data-toggle' => 'modal', 'data-target' => '#j-modal-detail']); ?> </p> <?php Pjax::begin(['id' => 'pjax-detail']); ?> <div class="table-small"> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'tgl', 'value' => function ($data) { return FunctionModel::tglIndo($data->tgl); }, 'footer' => 'Total', 'footerOptions' => ['style' => 'text-align : center']], ['attribute' => 'jumlah', 'contentOptions' => ['class' => 'right'], 'format' => ['Decimal', 0], 'footer' => number_format(DetailModel::getTotal(), 0)], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{detail}', 'buttons' => ['detail' => function ($url, $model, $key) { return Html::a('detail', Yii::$app->urlManager->createUrl(['detail/detil', "tgl" => $model->tgl]), ['title' => 'lihat detail pengeluaran']); }], 'contentOptions' => ['class' => 'middle']]], 'showFooter' => TRUE, 'footerRowOptions' => ['class' => 'right', 'style' => 'font-weight:bold']]); ?> </div> <?php Pjax::end(); ?> </div> <!-- Modal --> <div class="modal fade" id="j-modal-detail" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header">
use yii\widgets\Pjax; /* @var $this yii\web\View */ /* @var $searchModel app\models\DetailSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ // var_dump(DetailModel::getDetailJumlah($data['tgl']));return; $this->title = "Detail Pengeluaran"; $this->params['breadcrumbs'][] = $this->title; ?> <div class="detail-model-index"> <h1><?php echo Html::encode($this->title, false); ?> </h1> <p><?php echo FunctionModel::tglIndo($data['tgl']); ?> </p> <?php // echo $this->render('_search', ['model' => $searchModel]); ?> <p> <?php echo Html::a('Create Detail Model', ['create'], ['class' => 'btn btn-success']); ?> </p> <?php Pjax::begin(['id' => 'pjax-detail']); ?> <div class="table-medium">