Exemplo n.º 1
0
 /**
  * @Author: ANH DUNG Sep 12, 2014
  * @Todo: show Report
  */
 public function actionReport()
 {
     try {
         FiInvoice::ToExcelReport();
         $model = new FiInvoice();
         $model->date_from = date("d/m/Y");
         $model->date_to = date("d/m/Y");
         $model->report_type = FiInvoice::REPORT_DAILY;
         $data = array();
         unset($_SESSION['REPORT_DATA']);
         if (isset($_POST['FiInvoice'])) {
             $model->attributes = $_POST['FiInvoice'];
             $data = FiInvoice::CalcReport($model);
         }
         $this->render('report/Report', array('model' => $model, 'actions' => $this->listActionsCanAccess, 'data' => $data));
     } catch (Exception $e) {
         Yii::log("Exception " . print_r($e, true), 'error');
         throw new CHttpException("Exception " . print_r($e, true));
     }
 }