Conjunto de509b8 en sipes
- Fecha y hora:
- 05/10/2017 17:16:26 (hace 7 años)
- Branches:
- stable
- Children:
- 14735b0
- Parents:
- 9dbb666
- Fichero:
-
- 1 editado
Leyenda
- No modificado
- Añadido
- Eliminado
-
0.3-modules/reportes_sipes_views/reportes_sipes_views.module
r9dbb666 rde509b8 65 65 */ 66 66 function reporte_sipes_views_page() { 67 $view_id = 'reporte_poan_anual'; 68 $view = views_get_view($view_id); 69 $display_id = 'block_1'; 70 $view->set_display($display_id); 71 $view->override_path = $_GET['q']; 72 $view->pre_execute(); 73 $view->execute(); 74 // $output = $view->render(); 75 $year = variable_get('proyectos_operativos_anho_creacion', 0); 76 $header = '<table border="1" cellpadding="4" style="text-align: justify">'; 77 $header .= '<tr>'; 78 $header .= '<th rowspan = "2" style="width: 5%; text-align: center">' . t('Cod.') . '</th>'; 79 $header .= '<th rowspan = "2" style="width: 10%; text-align: center">' . t('Nombre del Proyecto.') . '</th>'; 80 $header .= '<th rowspan = "2" style="width: 10%; text-align: center">' . t('Objetivo EspecÃfico del Proyecto') . '</th>'; 81 $header .= '<th rowspan = "2" style="width: 10%; text-align: center">' . t('Ejecutor') . '</th>'; 82 $header .= '<th rowspan = "2" style="width: 10%; text-align: center">' . t('Localización') . '</th>'; 83 $header .= '<th colspan = "2" style="width: 20%; text-align: center">' . t('Resultado de las Acciones Especificas del Proyecto @year', array('@year' => $year)) . '</th>'; 84 $header .= '<th colspan = "3" style="width: 35%; text-align: center">' . t('Asignación Presupuestaria @year (En Millones de Bolivares)', array('@year' => $year)) . '</th>'; 85 $header .= '</tr>'; 86 $header .= '<tr>'; 87 $header .= '<th style="text-align: center">' . t('Bien o Servicio') . '</th>'; 88 $header .= '<th style="text-align: center">' . t('Cantidad/Meta') . '</th>'; 89 $header .= '<th style="text-align: center">' . t('Fuente') . '</th>'; 90 $header .= '<th style="text-align: center">' . t('Monto') . '</th>'; 91 $header .= '<th style="text-align: center">' . t('Total') . '</th>'; 92 $header .= '</tr>'; 93 $plan_nombre = t('Plan Operativo Anual: @anho', array('@anho' => $year)); 94 $begin = ''; 95 $output = ''; 96 $nid = 0; 97 foreach ($view->result as $key => $values) { 98 if ($values->node_ente_planificador_hierarchical_nid != $nid) { 99 $output .= $begin . '<p></p><p>' . $plan_nombre . '<br>'; 100 $output .= t('ORGANISMO RESPONSABLE: @ente', array('@ente' => $values->node_ente_planificador_hierarchical_title)) . '</p>'; 101 $output .= $header; 102 $begin = '</table><br>'; 103 } 104 105 $output .= '<tr>'; 106 //field codigo 107 $output .= '<td>' . $values->node_title . '</td>'; 108 $output .= '<td>' . $values->node_data_field_proyecto_poan_field_proyecto_titulo_value . '</td>'; 109 $output .= '<td>' . $values->node_data_field_proyecto_poan_field_proyecto_og_value . '</td>'; 110 $output .= '<td>' . $values->node_node_data_field_proyecto_ente_title . '</td>'; 111 $output .= '<td>' . implode('<hr><br>', $values->views_php_6) . '</td>'; 112 $output .= '<td>' . implode('<hr><br>', $values->views_php_7['bien']) . '</td>'; 113 $output .= '<td>' . implode('<hr><br>', $values->views_php_7['unidades']) . '</td>'; 114 $output .= '<td>' . implode('<hr><br>', $values->views_php_10['fuentes']) . '</td>'; 115 $output .= '<td>' . implode('<hr><br>', $values->views_php_10['valores']) . '</td>'; 116 $output .= '<td align="center">' . $values->views_php_10['total'] . '</td>'; 117 $output .= '</tr>'; 118 } 119 $output .= $begin; 67 if (!user_access('admin planificador')) return false; 68 120 69 $author = variable_get('site_name', ''); 121 70 module_load_include('module', 'libraries', 'libraries'); 122 71 $path = libraries_get_path('tcpdf'); 123 124 72 125 73 if (($path) && (file_exists($path . '/config/lang/spa.php'))) { … … 168 116 // add a page 169 117 //$pdf->AddPage(); 170 $pdf->AddPage('L', 'Legal'); 118 171 119 if ($pdf) { 172 120 $title = t('Reporte Anual POAN @year', array('@year' => $year)); 173 121 $pdf->SetTitle($title); 174 122 $pdf->SetSubject($title); 123 } 124 125 $view_id = 'reporte_poan_anual'; 126 $view = views_get_view($view_id); 127 $display_id = 'block_1'; 128 129 $view->set_display($display_id); 130 $view->override_path = $_GET['q']; 131 $view->pre_execute(); 132 $view->execute(); 133 $view->post_execute(); 134 // $output = $view->render(); 135 136 137 138 $year = variable_get('proyectos_operativos_anho_creacion', 0); 139 $header = '<table border="1" cellpadding="4" style="text-align: justify">'; 140 $header .= '<tr>'; 141 $header .= '<th rowspan = "2" style="width: 5%; text-align: center">' . t('Cod.') . '</th>'; 142 $header .= '<th rowspan = "2" style="width: 10%; text-align: center">' . t('Nombre del Proyecto.') . '</th>'; 143 $header .= '<th rowspan = "2" style="width: 10%; text-align: center">' . t('Objetivo EspecÃfico del Proyecto') . '</th>'; 144 $header .= '<th rowspan = "2" style="width: 10%; text-align: center">' . t('Ejecutor') . '</th>'; 145 $header .= '<th rowspan = "2" style="width: 10%; text-align: center">' . t('Localización') . '</th>'; 146 $header .= '<th colspan = "2" style="width: 20%; text-align: center">' . t('Resultados esperados del Proyecto @year', array('@year' => $year)) . '</th>'; 147 $header .= '<th colspan = "3" style="width: 35%; text-align: center">' . t('Asignación Presupuestaria @year', array('@year' => $year)) . '</th>'; 148 $header .= '</tr>'; 149 $header .= '<tr>'; 150 $header .= '<th style="text-align: center">' . t('Bien o Servicio') . '</th>'; 151 $header .= '<th style="text-align: center">' . t('Cantidad/Meta') . '</th>'; 152 $header .= '<th style="text-align: center">' . t('Fuente') . '</th>'; 153 $header .= '<th style="text-align: center">' . t('Monto') . '</th>'; 154 $header .= '<th style="text-align: center">' . t('Total') . '</th>'; 155 $header .= '</tr>'; 156 $plan_nombre = t('<strong>PLAN OPERATIVO ANUAL NACIONAL @anho (POAN @anho)</strong>', array('@anho' => $year)); 157 $begin = ''; 158 $nid = 0; 159 foreach ($view->result as $key => $values) { 160 $output = ''; 161 if ($values->node_ente_planificador_hierarchical_nid != $nid) { 162 $objetivo = implode('<br>', $values->views_php_18[0]); 163 $output .= $begin . '<p></p><p>' . $plan_nombre . '<br>'; 164 $output .= '<strong>' . t('OBJETIVO HISTORICO:') . '</strong><br>' . $objetivo . '<br>'; 165 $output .= t('<strong>ORGANISMO RESPONSABLE</strong>: @ente', array('@ente' => $values->node_ente_planificador_hierarchical_title)) . '</p>'; 166 $output .= $header; 167 $begin = '</table><br>'; 168 } 169 170 $output .= '<tr>'; 171 //field codigo 172 $output .= '<td>' . $values->node_title . '</td>'; 173 $output .= '<td>' . $values->node_data_field_proyecto_poan_field_proyecto_titulo_value . '</td>'; 174 $output .= '<td>' . $values->node_data_field_proyecto_poan_field_proyecto_og_value . '</td>'; 175 $output .= '<td>' . $values->node_node_data_field_proyecto_ente_title . '</td>'; 176 $output .= '<td>' . implode('<hr><br>', $values->views_php_6) . '</td>'; 177 $output .= '<td>' . $values->node_data_field_proyecto_poan_field_proyecto_descripcion_bie . '</td>'; 178 179 $term = taxonomy_get_term($values->node_data_field_proyecto_poan_field_proyecto_unidadm_value); 180 $output .= '<td>' . $values->views_php_17 . ' ' . $term->name . '</td>'; 181 182 $output .= '<td>' . implode('<hr><br>', $values->views_php_10['fuentes']) . '</td>'; 183 $output .= '<td>' . implode('<hr><br>', $values->views_php_10['valores']) . '</td>'; 184 $output .= '<td align="center">' . $values->views_php_10['total'] . '</td>'; 185 $output .= '</tr>'; 186 $output .= $begin; 187 188 $pdf->AddPage('L', 'Legal'); 175 189 $pdf->writeHTML($output, true, false, true, false, ''); 176 190 $pdf->lastPage(); 191 192 } 193 194 if ($pdf) { 177 195 header('Content-type: text/plain'); 178 196 $name = 'reporte_anual_poan_' . $year . '.pdf'; … … 188 206 */ 189 207 function reporte_sipes_views_page_exel() { 208 if (!user_access('admin planificador')) return false; 209 190 210 $content = ''; 191 211 $view_id = 'reporte_poan_anual';
Nota: Vea TracChangeset
para ayuda en el uso del visor de conjuntos de cambios.