Esempio n. 1
0
<h1> Reporte de pesca embarcacion   <?php 
echo $matrices['nombrebarco'];
?>
</h1>
<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'temporadas-grid', 'dataProvider' => VwPescaEmbarcacionesParametros::model()->search_parametros($id, $idespecie, $codep), 'summaryText' => '', 'columns' => array('nomep', array('name' => 'fecha', 'type' => 'raw', 'value' => 'CHtml::link(
				"".$data->fecha."",
				 array("/reportepesca/gestionaparte", 
				 "fecha"=>$data->fecha, 
				 "idt"=>$data->idtemporada )
				 )'), 'motivozarpe', 'sdeclarada', 'sdescargada', 'sd2', 'sct', 'sfd', 'eficienciabodega', 'd2porhora', 'horasta')));
?>

<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'temporadas-grid', 'dataProvider' => VwPescaEmbarcaciones::model()->search_barco_temporada($id, $idespecie, $codep), 'summaryText' => '', 'columns' => array(array('name' => 'nomep', 'header' => 'nomep'), array('name' => 'fecha', 'header' => 'fecha', 'type' => 'raw', 'value' => '"-----------"'), array('name' => 'motivozarpe', 'header' => 'Motivozarpe', 'type' => 'raw', 'value' => '"-----------------"'), array('name' => 'sdeclarada', 'header' => 'sdeclarada'), array('name' => 'sdescargada', 'header' => 'sdescargada'), 'sd2', 'sct', 'sfd', array('name' => 'eficienciabodega', 'header' => 'eficienciabodega'), 'd2porhora', 'horasta')));
Esempio n. 2
0
 public function actionImprimebarco($id, $codep, $idespecie)
 {
     $this->layout = "";
     $especies = VwReportepescaEspeciesTemporada::model()->search_por_temporada($id);
     if (!is_null($especies)) {
         $matrices = VwPescaEmbarcacionesParametros::model()->retornadatos($id, $idespecie, $codep);
         # You can easily override default constructor's params
         $mPDF1 = Yii::app()->ePdf->mpdf('', 'A4');
         # render (full page)
         $mPDF1->WriteHTML($this->render('index', array(), true));
         # Load a stylesheet
         $stylesheet = file_get_contents(Yii::getPathOfAlias('webroot.css') . '/main.css');
         $mPDF1->WriteHTML($stylesheet, 1);
         # renderPartial (only 'view' of current controller)
         $mPDF1->WriteHTML($this->render('vw_resumen_barco', array('matrices' => $matrices, 'id' => $id, 'codep' => $codep, 'idespecie' => $idespecie), true));
         # Renders image
         $mPDF1->WriteHTML(CHtml::image(Yii::getPathOfAlias('webroot.css') . '/bg.gif'));
         # Outputs ready PDF
         $mPDF1->Output();
         //if (!is_null($matrices) ) {
         //}else {
         // throw new CHttpException(404,'No se pudo encontrar el registro solicitado para visualizar datos');
         //}
     } else {
         throw new CHttpException(404, 'No se pudo encontrar el registro solicitado para visualizar la temporada');
     }
 }