public function actionIndex() { $this->pageTitle = 'Оплаты'; $model = new Invoice('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Invoice'])) { $model->attributes = $_GET['Invoice']; } $this->render('index', array('model' => $model)); }
/** * Lists all models. */ public function actionIndex() { parent::actionIndex(); $this->lookupdata(); $model = new Invoice('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Invoice'])) { $model->attributes = $_GET['Invoice']; } 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, 'invoicedet' => $this->invoicedet, 'invoiceacc' => $this->invoiceacc)); }
echo $form->error($model, 'transdate'); ?> </div> </td> <td> <?php echo $form->labelEx($model, 'invoiceid'); ?> <?php echo $form->hiddenField($model, 'invoiceid'); ?> <input type="text" name="invoiceno" id="invoiceno" readonly > <?php $this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'invoice_dialog', 'options' => array('title' => Yii::t('app', 'Invoice'), 'width' => 'auto', 'autoOpen' => false, 'modal' => true))); $invoice = new Invoice('searchwfstatus'); $invoice->unsetAttributes(); // clear any default values if (isset($_GET['Invoice'])) { $invoice->attributes = $_GET['Invoice']; } $this->widget('zii.widgets.grid.CGridView', array('id' => 'invoice-grid', 'dataProvider' => $invoice->searchwfapstatus(), 'filter' => $invoice, 'template' => '{summary}{pager}<br>{items}{pager}{summary}', 'columns' => array(array('header' => '', 'type' => 'raw', 'value' => 'CHtml::Button("V", array("name" => "send_absstatus", "id" => "send_absstatus", "onClick" => "$(\\"#invoice_dialog\\").dialog(\\"close\\"); $(\\"#invoiceno\\").val(\\"$data->invoiceno\\"); $(\\"#Cashbank_invoiceid\\").val(\\"$data->invoiceid\\");"))'), array('name' => 'invoiceid', 'visible' => false, 'value' => '$data->invoiceid', 'htmlOptions' => array('width' => '1%')), 'invoiceno', array('name' => 'addressbookid', 'value' => '($data->customer!==null)?$data->customer->fullname:""')))); $this->endWidget('zii.widgets.jui.CJuiDialog'); echo CHtml::Button('...', array('onclick' => '$("#invoice_dialog").dialog("open"); return false;')); ?> <?php echo $form->error($model, 'addressbookid'); ?>
/** * Manages all models. */ public function actionAdmin() { $model = new Invoice('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Invoice'])) { $model->attributes = $_GET['Invoice']; } $this->render('admin', array('model' => $model)); }
/** * Manages all models. */ public function actionReportAjax() { $model = new Invoice('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Invoice'])) { $model->attributes = $_GET['Invoice']; $from_date = $_GET['Invoice']['from_date']; $to_date = $_GET['Invoice']['to_date']; } else { $from_date = date('Y-m-d'); $to_dat = date('Y-m-d'); } $model->from_date = $from_date; $model->to_date = $to_date; if (Yii::app()->request->isAjaxRequest) { echo CJSON::encode(array('status' => 'success', 'div' => $this->renderPartial('_report_ajax', array('model' => $model), true, false))); } else { $this->render('_report', array('model' => $model)); } }