source: sipes/0.3-modules/sipp_pdf/templates/proyectos-ver-reformulacion-ae-pdf-pdf.tpl.php @ 2fa3319

stableversion-3.0
Last change on this file since 2fa3319 was 303fae2, checked in by José Gregorio Puentes <jpuentes@…>, 9 años ago

se agregaron los modulos

  • Propiedad mode establecida a 100755
File size: 4.1 KB
Línea 
1<?php
2?>
3<h2><?php print t('Resumen del Proyecto'); ?></h2>
4<p>
5  <b><?php print t('Código Único del Proyecto'); ?>:</b> <?php print $node->field_proyecto_codigo[0]['value']; ?>
6</p>
7<p>
8  <b><?php print t('Nombre del Proyecto'); ?>:</b> <?php print $node->title; ?>
9</p>
10<p>
11  <b><?php print t('Organismo'); ?>:</b> <?php print $ente_planificador->title; ?>
12</p>
13<h2><?php print t('Resumen Financiero de las Acciones'); ?></h2>
14<?php
15  $header = array();
16  $header[] = array('data' => t('Partidas'), 'colspan' => 2);
17  foreach($ftypes as $id_field => $texto) {
18    $header[] = array('data' => $texto);
19  }
20  $header[] = array('data' => t('TOTAL'));
21  $rows = array();
22  $rowsF = array();
23  $i = 0;
24  $totales = array();
25  $totalT = 0;
26  $plant = array();
27  $sumaplan = 0;
28  $sumaplanm = array();
29  foreach($partidas as $tid => $grupo) {
30    $i++;
31    $total = 0;
32    $total1 = 0;
33    $row = array();
34    $row1 = array();
35    $row[] = array('data' => $grupo, 'rowspan' => 2);
36    $row[] = array('data' => t('planificado'), );
37    $row1[] = array('data' => t('variación'), );
38    foreach($ftypes as $id_field => $texto) {
39      $varia = isset($variaciones['field_accion_esp_programacion_' . $ae->nid][$tid][$id_field]) ? $variaciones['field_accion_esp_programacion_' . $ae->nid][$tid][$id_field] : 0;
40      $min = $partidas_nodo[$tid][$id_field] + $varia;
41      $valor = isset($reformula['field_accion_esp_programacion_' . $ae->nid][$tid][$id_field])? $reformula['field_accion_esp_programacion_' . $ae->nid][$tid][$id_field] : 0;
42      $total1 += $valor;
43      $totalT += $min + $valor;
44      if (!isset($plant[$tid])) {
45        $plant[$tid] = 0;
46      }
47      $plant[$tid] += $min;
48      $sumaplan += $min;
49      if (!isset($totales[$id_field])) {
50        $totales[$id_field] = 0;
51      }
52      if (!isset($sumaplanm[$id_field])) {
53        $sumaplanm[$id_field] = 0;
54      }
55      $sumaplanm[$id_field] += $min;
56      $totales[$id_field] += $min + $valor;
57      $idformu = $ae->nid . '_field_accion_esp_programacion_' . $tid . '_' . $id_field;
58      $idformuj = str_replace('_', '-', $idformu);
59      $row[] = array('data' => $min, );
60      $row1[] = array('data' => $valor, );
61    }
62    $row[] = array('data' => $plant[$tid], );
63    $row1[] = array('data' => $total1, );
64    $rows[] = $row;
65    $rows[] = $row1;
66  }
67  $row = array();
68  $row[] = array('data' => '<b>' . t('TOTAL') . '</b>', 'colspan' => 2, 'align' => 'right');
69  foreach($ftypes as $id_field => $texto) {
70    $row[] = array('data' => $totales[$id_field], );
71  }
72  $row[] = array('data' => $totalT, );
73  $rows[] = $row;
74  print theme('table', $header, $rows, array('border' => '1'));
75?>
76<h2><?php print t('Distribución por fuentes de Financiamiento'); ?></h2>';
77<?php
78  $rows = array();
79  $row = array();
80  $row1 = array();
81  $sumalT = 0; 
82  foreach($arreglo as $id => $arreglo1) {
83    $sumal = 0; 
84    $output1 = '';
85    foreach($arreglo1 as $id1) {
86      $field = content_fields($id1, 'accion_especifica');
87      $varia = isset($variaciones[$id1 . '_' . $ae->nid][0]['value']) ? $variaciones[$id1 . '_' . $ae->nid][0]['value'] : 0;
88      $min = $ae->{$id1}[0]['value'] + $varia;
89      if (!isset($sumafinm[$id])) {
90        $sumafinm[$id] = 0;
91      }
92      $sumafinm[$id] += $min;
93      $sumatotalf += $min;
94      $field = content_fields($id1, 'accion_especifica');
95      $valor = isset($reformula[$id1 . '_' . $ae->nid][0]['value'])? $reformula[$id1 . '_' . $ae->nid][0]['value'] : 0;
96      $total1 += $valor;
97      $total += $valor;
98      $sumal += $min + $valor; 
99      $sumalT += $min + $valor; 
100      $idformuj = str_replace('_', '-', $id1);
101      $output1 .= '<p><b>' . $field['widget']['label'] . ':</b>' . '<br><b>' . t('Planificado') . ':</b> ' . $min . '<br><b>' . t('Variación') . ':</b> ' . $valor .  '</p>';
102    }
103    $row[] = array('data' => $output1, );
104    $row1[] = array('data' => $sumal, );
105  }
106  $rows[] = $row;
107  $rows[] = $row1;
108  $row = array();
109  $row[] = array('data' => '<b>' . t('TOTAL') . ':</b>', 'colspan' => 3, 'align' => 'right');
110  $row[] = array('data' => $sumalT, );
111  $rows[] = $row;
112  print theme('table', array(), $rows, array('border' => '1'));
113?>
Nota: Vea TracBrowser para ayuda de uso del navegador del repositorio.