Example #1
0
    }
}, 'layout' => '
                                        <div class="pull-right">
                                            {summary}
                                        </div>
                                        {items}
                                        <div class="pull-right">
                                            {pager}
                                        </div>
                                        ', 'pager' => ['maxButtonCount' => 10, 'prevPageLabel' => 'Anterior', 'nextPageLabel' => 'Siguiente', 'prevPageCssClass' => 'prev hidden-xs', 'nextPageCssClass' => 'next hidden-xs'], 'columns' => [['attribute' => 'workstations_id', 'value' => 'workstations.full_name', 'headerOptions' => ['style' => 'text-align: center']], ['attribute' => 'cell_number', 'contentOptions' => ['width' => '80', 'style' => 'text-align: center'], 'headerOptions' => ['style' => 'text-align: center']], ['attribute' => 'profit_center_id', 'value' => 'profitCenter.name', 'filter' => Arrayhelper::map(ProfitCenter::find()->all(), 'number', 'name'), 'headerOptions' => ['style' => 'text-align: center']], ['attribute' => 'plan', 'value' => function ($data) {
    return CellPhoneCosts::getPlans($data->plan);
}, 'filter' => CellPhoneCosts::getPlans(), 'headerOptions' => ['style' => 'text-align: center'], 'contentOptions' => ['width' => '150']], ['attribute' => 'real_cost_time', 'value' => function ($data) {
    return round($data->real_cost_time) . ' minutos';
}, 'headerOptions' => ['style' => 'text-align: center'], 'contentOptions' => ['width' => '80', 'style' => 'text-align: center']], ['attribute' => 'sms_cost', 'format' => 'currency', 'headerOptions' => ['style' => 'text-align: center'], 'contentOptions' => ['width' => '115', 'style' => 'text-align: right']], ['attribute' => 'long_distance', 'format' => 'currency', 'headerOptions' => ['style' => 'text-align: center'], 'contentOptions' => ['width' => '120', 'style' => 'text-align: right']], ['attribute' => 'month', 'value' => function ($data) {
    return CellPhoneCosts::getMonths($data->month);
}, 'filter' => CellPhoneCosts::getMonths(), 'headerOptions' => ['style' => 'text-align: center'], 'contentOptions' => ['width' => '60', 'style' => 'text-align: center']], ['attribute' => 'year', 'filter' => ArrayHelper::map(CellPhoneCosts::getYears(), 'year', 'year'), 'headerOptions' => ['style' => 'text-align: center'], 'contentOptions' => ['width' => '60', 'style' => 'text-align: center']], ['attribute' => 'cost', 'format' => 'currency', 'headerOptions' => ['style' => 'text-align: center'], 'contentOptions' => ['width' => '60', 'style' => 'text-align: right']]]]);
?>
                        <?php 
Pjax::end();
?>



                    </div>
                </div>


            </div>
        </div>
    </div>