<?php

use backend\models\Billing;
use yii\helpers\Html;
use yii\helpers\Url;
use yii\grid\ActionColumn;
use yii\grid\GridView;

/** @var yii\web\View $this */
/** @var backend\models\BillingSearch $searchModel */
/** @var yii\data\ActiveDataProvider $dataProvider */

$this->title = 'Billings';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="billing-index">

    <h1><?= Html::encode($this->title) ?></h1>

    <p>
        <?= Html::a('Create Billing', ['create'], ['class' => 'btn btn-success']) ?>
    </p>

    <?php // echo $this->render('_search', ['model' => $searchModel]); ?>

    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],

            // 'BILLING_UUID',
            'BILLING_PROFILE_UUID',
            'BILLING_SKEMA_UUID',
            'BILLING_SKEMA_BIAYA',
            'BILLING_BAYAR_BUKTI',
            'BILLING_BAYAR_TGL',
            // 'BILLING_VERIFIKASI',
            //'BILLING_VERIFIKASI_LSP',
            //'BILLING_VERIFIKASI_USERNAME',
            //'BILLING_VERIFIKASI_TGL',
            //'BILLING_PENAGIHAN',
            //'BILLING_PENAGIHAN_TGL',
            //'CREATED',
            //'USERNAME',
            [
                'class' => ActionColumn::className(),
                'urlCreator' => function ($action, Billing $model, $key, $index, $column) {
                    return Url::toRoute([$action, 'BILLING_UUID' => $model->BILLING_UUID]);
                 }
            ],
        ],
    ]); ?>


</div>
