コード例 #1
0
 public function actionIndex()
 {
     $model = new fReport();
     if (isset($_POST['fReport'])) {
         $model->attributes = $_POST['fReport'];
         if ($model->validate()) {
             $modelReport = tAccountReport::model()->findByPk((int) $model->report_id);
             $pdf = new $modelReport->link('P', 'mm', 'A4');
             //$pdf=new profitlost1('P','mm','A4');
             //$pdf=new balanceSheet1('P','mm','A4');
             $pdf->AliasNbPages();
             $pdf->AddPage();
             $pdf->SetFont('Arial', '', 12);
             $pdf->report($model->periode_date, $model->report_id);
             $pdf->Output();
         }
     }
     $this->render('index', array('model' => $model));
 }
コード例 #2
0
<?php

$this->breadcrumbs = array('Financial Statement' => array('index'), 'index');
?>

<div class="page-header">
	<h1><?php 
echo CHtml::image(Yii::app()->request->baseUrl . '/images/icon/report.png');
?>
	Financial Statement</h1>
</div>
<?php 
$this->widget('bootstrap.widgets.BootGridView', array('id' => 't-account-report-grid', 'dataProvider' => tAccountReport::model()->search(), 'itemsCssClass' => 'table table-striped table-bordered', 'template' => '{items}{pager}', 'columns' => array(array('class' => 'CButtonColumn', 'template' => '{report}', 'buttons' => array('report' => array('label' => '<i class="icon-print"></i> Report', 'url' => 'Yii::app()->createUrl($data->link)'))), 'title', 'description')));
?>

<br />