Guest User

Untitled

a guest
Feb 20th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.41 KB | None | 0 0
  1. //VIEW
  2. <?php
  3. $this->breadcrumbs=array(
  4.     'Invoices'=>array('index'),
  5.     'Manage',
  6. );
  7.  
  8. $this->menu=array(
  9.     array('label'=>'List Invoice', 'url'=>array('index')),
  10.     array('label'=>'Create Invoice', 'url'=>array('create')),
  11. );
  12.  
  13. $form=$this->beginWidget('CActiveForm', array(
  14.     'id'=>'invoice-form',
  15.     'enableAjaxValidation'=>false,
  16. ));
  17. $this->widget('zii.widgets.grid.CGridView', array(
  18.     'id'=>'invoice-grid',
  19.  
  20.     'dataProvider'=>$model->search(),
  21.  
  22.         'filter'=>$model,
  23.     'columns'=>array(
  24.                 array(
  25.                     'name'=>'contactName',
  26.                     'value'=>'$data->user->contact->name',
  27.                     //'filter'=>CHtml::activeTextField(Contact::model(), 'name')
  28.                 ),
  29.                 array(
  30.                     'name'=>'contactEmail',
  31.                     'value'=>'$data->user->contact->email',
  32.                     //'filter'=>CHtml::activeTextField(Contact::model(), 'email')
  33.                 ),
  34.                 array(
  35.                     'name'=>'bandwidth',
  36.                     'value'=>'number_format($data->bandwidth, 2)',
  37.                     'filter'=>false
  38.                 ),
  39.                 array(
  40.                     'name'=>'total',
  41.                     'value'=>'"R ".number_format($data->bandwidth, 2)*$data->price',
  42.                     'filter'=>false
  43.                 ),
  44.         array(
  45.             'class'=>'CButtonColumn',
  46.         ),
  47.     ),
  48. ));
  49. $this->endWidget();
  50. ?>
Add Comment
Please, Sign In to add comment