Ejemplo n.º 1
0
?>
	</div>
		</td>
        <td>
		  <div class="row">
		<?php 
echo $form->labelEx($model, 'giheaderid');
?>
    <?php 
echo $form->hiddenField($model, 'giheaderid');
?>
    <input type="text" name="pono" id="gino" readonly >
    <?php 
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'giheader_dialog', 'options' => array('title' => Yii::t('app', 'Goods Issue'), 'width' => 'auto', 'autoOpen' => false, 'modal' => true)));
$giheader = new Giheader('search');
$giheader->unsetAttributes();
// clear any default values
if (isset($_GET['Giheader'])) {
    $giheader->attributes = $_GET['Giheader'];
}
$this->widget('zii.widgets.grid.CGridView', array('id' => 'giheader-grid', 'dataProvider' => $giheader->searchwfgstatus(), 'filter' => $giheader, 'template' => '{summary}{pager}<br>{items}{pager}{summary}', 'columns' => array(array('header' => '', 'type' => 'raw', 'value' => 'CHtml::Button("+",
          array("name" => "send_absstatus",
          "id" => "send_absstatus",
          "onClick" => "$(\\"#giheader_dialog\\").dialog(\\"close\\");
          $(\\"#gino\\").val(\\"$data->gino\\");
          $(\\"#Grheader_giheaderid\\").val(\\"$data->giheaderid\\");
          generatedata2();"))'), array('name' => 'giheaderid', 'visible' => false, 'value' => '$data->giheaderid'), 'gino', array('name' => 'gidate', 'type' => 'raw', 'value' => 'date(Yii::app()->params["dateviewfromdb"], strtotime($data->gidate))'))));
$this->endWidget('zii.widgets.jui.CJuiDialog');
echo CHtml::Button('...', array('onclick' => '$.fn.yiiGridView.update("giheader-grid");$("#giheader_dialog").dialog("open"); return false;'));
?>
		<?php 
 /**
  * Lists all models.
  */
 public function actionIndex()
 {
     parent::actionIndex();
     $this->lookupdata();
     $model = new Giheader('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Giheader'])) {
         $model->attributes = $_GET['Giheader'];
     }
     if (isset($_GET['Gidetail'])) {
         $this->gidetail = new Gidetail('searchbygiheaderid');
         $this->gidetail->unsetAttributes();
         // clear any default values
         if (isset($_GET['Gidetail'])) {
             $this->gidetail->attributes = $_GET['Gidetail'];
         }
     }
     if (isset($_GET['pageSize'])) {
         Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']);
         unset($_GET['pageSize']);
         // would interfere with pager and repetitive page size change
     }
     $this->render('index', array('model' => $model, 'gidetail' => $this->gidetail));
 }
 /**
  * Lists all models.
  */
 public function actionIndex()
 {
     parent::actionIndex();
     $grdetail = new Grdetail('search');
     $grdetail->unsetAttributes();
     // clear any default values
     if (isset($_GET['Grdetail'])) {
         $grdetail->attributes = $_GET['Grdetail'];
     }
     $poheader = new Poheader('search');
     $poheader->unsetAttributes();
     // clear any default values
     if (isset($_GET['Poheader'])) {
         $poheader->attributes = $_GET['Poheader'];
     }
     $giheader = new Giheader('search');
     $giheader->unsetAttributes();
     // clear any default values
     if (isset($_GET['Giheader'])) {
         $giheader->attributes = $_GET['Giheader'];
     }
     $model = new Grheader('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Grheader'])) {
         $model->attributes = $_GET['Grheader'];
     }
     if (isset($_GET['pageSize'])) {
         Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']);
         unset($_GET['pageSize']);
         // would interfere with pager and repetitive page size change
     }
     $this->render('index', array('model' => $model, 'poheader' => $poheader, 'grdetail' => $grdetail, 'giheader' => $giheader));
 }