Ejemplo n.º 1
0
 public function init()
 {
     //$docs->=status=?? open??
     $this->content = \app\widgets\GridView::widget(array('id' => 'docs-grid', 'dataProvider' => $this->search(), 'layout' => '{items}{pager}', 'panel' => false, 'columns' => array(array('attribute' => 'doctype', 'value' => function ($data) {
         return \yii\helpers\html::a(\yii\helpers\html::encode((isset($data->docType) ? Yii::t("app", $data->docType->name) : "") . " #" . $data->docnum), \yii\helpers\BaseUrl::base() . ("/docs/view/" . $data->id));
     }, 'format' => 'raw'), array('attribute' => 'account_id', 'value' => function ($data) {
         return \yii\helpers\html::a(yii\helpers\html::encode($data->company), \yii\helpers\BaseUrl::base() . ("/accounts/transaction/" . $data->account_id));
     }, 'format' => 'raw'), 'total', array('attribute' => 'status', 'value' => function ($data) {
         return isset($data->docStatus) ? $data->docStatus->name : "";
     }))), true);
     //parent::init();
 }
Ejemplo n.º 2
0
 public function init()
 {
     //$docs = new Docs('search');
     $this->content = \app\widgets\GridView::widget(array('id' => 'sales-grid', 'dataProvider' => $this->search(), 'layout' => '{items}{pager}', 'panel' => false, 'columns' => array(array('attribute' => 'account_id', 'value' => function ($data) {
         return \yii\helpers\html::a(\yii\helpers\html::encode($data->company), \yii\helpers\BaseUrl::base() . ("/accounts/view/" . $data->account_id));
     }, 'format' => 'raw'), array('attribute' => 'docnum', 'value' => function ($data) {
         return \yii\helpers\html::a(\yii\helpers\html::encode($data->total), \yii\helpers\BaseUrl::base() . ("/docs/view/" . $data->id));
     }, 'format' => 'raw'), array('attribute' => 'due_date', 'value' => function ($data) {
         return $data->due_date;
     }))), true);
     //parent::init();
 }