Ignorar:
Fecha y hora:
08/06/2016 16:21:29 (hace 8 años)
Autor:
eramirez <eramirez@…>
Branches:
stable, version-3.0
Children:
79821dd
Parents:
78a3f26
Mensaje:

se modifico el modulo de proyectos operativos

Fichero:
1 editado

Leyenda

No modificado
Añadido
Eliminado
  • 0.3-modules/proyectos_operativos/proyectos_operativos.module

    r8c31f40 ra0cf94c  
    6767  if ($op == 'delete') {
    6868    return user_access('admin planificador');
     69    //return (user_access('admin planificador') || _proyectos_operativos_edita_datos_ae_access($node));
    6970  }
    7071}
     
    231232      elseif ($node->type == 'accion_especifica') {
    232233        $node->title = $node->titulo_asignado;
     234
     235
     236
     237        $format_number = array(
     238          'decimals' => variable_get('proyectos_operativos_number_decimals', 0),
     239          'dec_point' => variable_get('proyectos_operativos_number_dec_point', ','),
     240          'thousands_sep' => variable_get('proyectos_operativos_number_thousands_sep', '.'),
     241        );
     242        $ftypes = array(
     243          'value' => t('January'),
     244          'value_1' => t('February'),
     245          'value_2' => t('March'),
     246          'value_3' => t('April'),
     247          'value_4' => t('May'),
     248          'value_5' => t('June'),
     249          'value_6' => t('July'),
     250          'value_7' => t('August'),
     251          'value_8' => t('September'),
     252          'value_9' => t('Octuber'),
     253          'value_10' => t('November'),
     254          'value_11' => t('December'),
     255        );
     256        $proyecto = node_load($node->field_accion_esp_proyecto[0]['nid']);
     257        $field = content_fields('field_accion_esp_programacion', 'accion_especifica');
     258        $tree = taxonomy_get_tree($field['vid']);
     259        $vtid = $field['vtid'];
     260        $partidas = array();
     261        if ($tree) {
     262          foreach ($tree as $term) {
     263            if (isset($vtid[$term->tid])) {
     264              if ($term && module_exists('i18ntaxonomy') && i18ntaxonomy_vocabulary($term->vid) == I18N_TAXONOMY_LOCALIZE) {
     265                $term->name = tt("taxonomy:term:$term->tid:name", $unidad_medida_term->name);
     266              }
     267              $partidas[$term->tid] = $term->name;
     268            }
     269          }
     270        }
     271        $partidas_nodo = array();
     272        foreach ($node->field_accion_esp_programacion as $partida) {
     273          if(!empty($partida['tid'])) {
     274            $partidas_nodo[$partida['tid']] = $partida;
     275          }
     276        }
     277        $output = '';
     278        $output .= '<fieldset><legend>' . t('Distribución por Partidas Presupuestarias (Bs)') . '</legend>';
     279        $header = array();
     280        $header[] = array('data' => t('Partidas'));
     281        foreach($ftypes as $id_field => $texto) {
     282          $header[] = array('data' => $texto);
     283        }
     284        $header[] = array('data' => t('TOTAL'));
     285        $rows = array();
     286        $rowsF = array();
     287        $totales = array();
     288        $totalT = 0;
     289        $plant = array();
     290        $sumaplan = 0;
     291        $sumaplanm = array();
     292        foreach($partidas as $tid => $grupo) {
     293          $total = 0;
     294          $total1 = 0;
     295          $row = array();
     296          $row[] = array('data' => $grupo);
     297          foreach($ftypes as $id_field => $texto) {
     298            $min = $partidas_nodo[$tid][$id_field];
     299            if (!isset($plant[$tid])) {
     300              $plant[$tid] = 0;
     301            }
     302            $totalT += $min;
     303            $plant[$tid] += $min;
     304            $total += $min;
     305            $sumaplan += $min;
     306            if (!isset($sumaplanm[$id_field])) {
     307              $sumaplanm[$id_field] = 0;
     308            }
     309            $sumaplanm[$id_field] += $min;
     310            $row[] = array('data' => number_format($min, $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']), );
     311          }
     312          $row[] = array('data' => number_format($plant[$tid], $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']), );
     313          if ($plant[$tid] > 0) {
     314            $rows[] = $row;
     315          }
     316        }
     317        $row = array();
     318        $row[] = array('data' => '<b>' . t('TOTAL POR PARTIDAS') . '</b>', 'align' => 'right');
     319        foreach($ftypes as $id_field => $texto) {
     320          $row[] = array('data' => '<b>' . number_format($sumaplanm[$id_field], $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']) . '</b>', );
     321        }
     322        $row[] = array('data' => '<b>' . number_format($totalT, $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']) . '</b>', );
     323        $rows[] = $row;
     324        $output .= theme('table', $header, $rows);
     325        $output .= '</fieldset>';
     326        $node->content['accion_especifica_partidas_reformulado'] = array(
     327          '#value' => $output,
     328          '#weight' => 101,
     329        );
     330        $output = '';
     331
     332        //financiamiento
     333        $arreglo_financiamiento = array();
     334        $accion_especifica_number_fields = variable_get('accion_especifica_number_fields', 4);
     335        for($i = 0; $i < $accion_especifica_number_fields; $i++) {
     336          $arreglo_financiamiento['financiamiento_' . $i] = variable_get('accion_especifica_financiamiento_label_' . $i, '') ? variable_get('accion_especifica_financiamiento_label_' . $i, '') : '';
     337          $arreglo_financiamiento_fields['financiamiento_' . $i] = variable_get('accion_especifica_financiamiento_options_' . $i, array());
     338        }
     339        $rows = array();
     340        $row = array();
     341        $row1 = array();
     342        $sumalT = 0;
     343        foreach($arreglo_financiamiento as $id_items => $titulo) {
     344          $sumal = 0;
     345          $output1 = '<fieldset><legend>' . $titulo . '</legend>';
     346          foreach($arreglo_financiamiento_fields[$id_items] as $id1) {
     347            if ($id1) {
     348              $field = content_fields($id1, 'accion_especifica');
     349              $min = $node->{$id1}[0]['value'];
     350              if (!isset($sumafinm[$id_items])) {
     351                $sumafinm[$id_items] = 0;
     352              }
     353              $sumafinm[$id_items] += $min;
     354              $sumatotalf += $min;
     355              $field = content_fields($id1, 'accion_especifica');
     356              $sumal += $min;
     357              $sumalT += $min;
     358              $output1 .= '<div class="field"><div class="field-label">' . $field['widget']['label'] . ':</div>' . '<div class="field-label-planificado">' . number_format($min, $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']) . '</div>' . '</div>';
     359            }
     360          }
     361          $output1 .= '</fieldset>';
     362          $row[] = array('data' => $output1, );
     363          $row1[] = array('data' => number_format($sumal, $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']), );
     364        }
     365        $rows[] = $row;
     366        $rows[] = $row1;
     367        $row = array();
     368        $cantifuentes = count($arreglo_financiamiento);
     369        $row[] = array('data' => '<b>' . t('TOTAL FUENTES DE FINANCIAMIENTO') . ':</b>', 'colspan' => ($cantifuentes - 1), 'align' => 'right');
     370        $row[] = array('data' => '<b>' . number_format($sumalT, $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']) . '</b>', );
     371        $rows[] = $row;
     372        $output .= '<fieldset><legend>' . t('Distribución por fuentes de Financiamiento (Bs)') . '</legend>' . theme('table', array(), $rows) . '</fieldset>';
     373        $node->content['accion_especifica_fuentesfinanc_reformulado'] = array(
     374          '#value' => $output,
     375          '#weight' => 102,
     376        );
     377
     378
     379
     380
     381
     382
     383
     384
     385
    233386      }
    234387    break;
     
    310463 * Menu access control callback. Determina si un usuario tiene acceso a editar el flujo de trabajo
    311464 */
     465/*
    312466function _proyectos_operativos_edita_datos_wk_access($node = NULL) {
    313467  global $user;
     468print "<pre>";
     469print_r($node);
     470print "</pre>";
     471
    314472  $fecha = FALSE;
    315473  $ente = usuario_tiene_ente($user->uid);
     
    321479  }
    322480  $accesso = workflow_node_tab_access($node);
     481  return $fecha && $accesso && _proyectos_operativos_edita_datos_financieros_access($node);
     482}
     483*/
     484function _proyectos_operativos_edita_datos_wk_access($node = NULL) {
     485  global $user;
     486
     487
     488  if (!isset($node->field_proyecto_ente[0]['nid'])) {
     489    return FALSE;
     490  }
     491  $fecha = FALSE;
     492  $ente = usuario_tiene_ente($user->uid);
     493  $ente_planificador = ente_planificador_leer_ente_planificadores($node->field_proyecto_ente[0]['nid']);
     494  $children = FALSE;
     495
     496  if (user_access('admin planificador')) {
     497    $fecha = TRUE;
     498  }
     499  elseif ($ente_planificador->nid == $ente->nid) {
     500    $fecha = TRUE;
     501  }
     502  elseif (module_exists('ente_planificador_hierarchical')) {
     503     $fathers = _ente_planificador_hierarchical_get_descbyid($ente_planificador->nid, 1);
     504     $fecha = isset($fathers[$ente->nid]) ? TRUE : FALSE;
     505  }
     506//print $fecha . "hola";
     507  $accesso = workflow_node_tab_access($node);
     508//print _proyectos_operativos_edita_datos_financieros_access($node) . "aa";
     509/*
     510print "<pre>";
     511print_r($node);
     512print "</pre>";
     513*/
    323514  return $fecha && $accesso && _proyectos_operativos_edita_datos_financieros_access($node);
    324515}
     
    398589  $fecha = FALSE;
    399590  $ente = usuario_tiene_ente($user->uid);
     591/*
     592  $children = FALSE;
     593  if (module_exists('ente_planificador_hierarchical')) {
     594     $fathers = _ente_planificador_hierarchical_get_descbyid($ente_planificador->nid,1);
     595     $children = isset($fathers[$ente->nid]) ? TRUE : FALSE;
     596     //$childrens = _ente_planificador_hierarchical_get_descbyid($fathers['nid'], 0);
     597     //$children = isset($childrens[$ente->nid]) ? TRUE : FALSE;
     598  }
     599  if (($ente_planificador->nid != $ente->nid && !$children) && !user_access('admin planificador')) {
     600    return FALSE;
     601  }
     602*/
    400603  if ($ente_planificador->nid != $ente->nid && !user_access('admin planificador')) {
    401604    return FALSE;
     
    406609  }
    407610  if ($fecha) {
    408     if ($ente->nid == $ente_planificador->nid) {
     611    if ($ente->nid == $ente_planificador->nid || $children) {
    409612      $fecha = TRUE;
    410613    }
     
    11301333  $form = array();
    11311334  $form['#node'] = $node;
     1335//print "<pre>";print_r($form['#node']);print "</pre>";
    11321336  $form['#ac'] = $ac;
    11331337  $message = t('Esta seguro de eliminar la acción especifica @nombre?', array('@nombre' => $ac->titulo_asignado));
     
    11501354  foreach($proyecto->field_proyecto_accion_esp as $ac) {
    11511355    if ($ac['nid'] != $nid) {
    1152       $accion_esp[] = $ac['nid'];
     1356      $accion_esp[] = array('nid' => $ac['nid']);
    11531357    }
    11541358  }
     
    11571361  $texto = t('Se elimino la acción especifica @nombre', array('@nombre' => $ac->titulo_asignado));
    11581362  $proyecto->log = $texto;
     1363//print "<pre>";print_r($proyecto);print "</pre>";
     1364//juan();
     1365//drupal_set_message("<pre>". print_r($proyecto, 1). "</pre>");
     1366  node_save($proyecto);
    11591367  drupal_set_message($texto);
    11601368  if (!$_REQUEST['destination']) {
     
    11901398print "</pre>";
    11911399*/
     1400      $form['submit']['#value'] = 'Enviar';
    11921401      $current = $form['node']['#value']->_workflow;
    11931402      $form['#proyectos_operativos_states_d'] = array();
    1194       $options_worflow = $form['workflow']['Proyectos_Operativos']['#options'];
     1403      $nombre = check_plain((t($form['#wf']->name)));
     1404      $actual = $form['workflow'][$nombre]['#options'][$current];
     1405unset($form['workflow'][$nombre]['#options'][$current]);
     1406if (!count($form['workflow'][$nombre]['#options'])) {
     1407  drupal_set_title(t('El proyecto !proyecto se encuentra en  estado !estado', array('!proyecto' => $node->title, '!estado' =>$actual)));
     1408}
     1409      $options_worflow = $form['workflow'][$nombre]['#options'];
     1410$form['workflow'][$nombre]['#required'] = TRUE;
     1411//$wid = workflow_get_workflow_for_type('proyectos_operativos');
     1412//$workflow = workflow_load($wid);i
     1413//$nombre = check_plain((t($form['#wf']->name)));
     1414//borrar la opcion del estado actual
     1415//unset($form['workflow'][$nombre]['#options'][$current]);
     1416/*
     1417print "<pre>";
     1418print_r($form['workflow']);
     1419print "</pre>";
     1420*/
    11951421      if ($options_worflow) {
    11961422        foreach($options_worflow as $sid => $state) {
    11971423          if (variable_get('proyectos_operativos_state_d_' . $current . '_' . $sid, FALSE)) {
    11981424            $form['#proyectos_operativos_states_d'][$sid] = $sid;
    1199             $form['workflow']['Proyectos_Operativos']['#options'][$sid] = t(variable_get('proyectos_operativos_state_tdevueltos', 'Devuelto a @state'), array('@state' => $form['workflow']['Proyectos_Operativos']['#options'][$sid]));
     1425            $form['workflow'][$nombre]['#options'][$sid] = t(variable_get('proyectos_operativos_state_tdevueltos', 'Devuelto a @state'), array('@state' => $form['workflow'][$nombre]['#options'][$sid]));
    12001426          }
    12011427          else {
    1202             $form['workflow']['Proyectos_Operativos']['#options'][$sid] = t(variable_get('proyectos_operativos_state_tndevueltos', 'Enviado a @state'), array('@state' => $form['workflow']['Proyectos_Operativos']['#options'][$sid]));
    1203           }
    1204         }
     1428            $form['workflow'][$nombre]['#options'][$sid] = t(variable_get('proyectos_operativos_state_tndevueltos', 'Enviado a @state'), array('@state' => $form['workflow'][$nombre]['#options'][$sid]));
     1429//$form['workflow'][$nombre]['#default_value'] = $sid;
     1430          }
     1431        }
     1432        $form['workflow'][$nombre]['#default_value'] = $sid;
    12051433      }
    12061434      $form['#validate'][] = 'proyectos_operativos_cambia_workflow_description_validate';
     
    12871515  $node = $form_state['values']['node'];
    12881516  $form_state['redirect'] = 'proyectosop/' . $node->nid;
    1289   drupal_set_message(t('Se modifico el estado del proyecto.'));
     1517  $choices = workflow_field_choices($form_state['values']['node']);
     1518  drupal_set_message(t('Proyecto enviado a "#usuario".', array('#usuario' => $choices[$node->workflow])));
     1519  //drupal_set_message(t('Se modifico el estado del proyecto.'));
    12901520}
    12911521
     
    14521682  $current = workflow_node_current_state($node);
    14531683  // theme_workflow_current_state() must run state through check_plain().
    1454   drupal_set_title(t('Cambiar el proyecto !proyecto del estado !estado', array('!proyecto' => $node->title, '!estado' =>$states[$current])));
     1684  drupal_set_title(t('El proyecto !proyecto se encuentra en el estado "!estado"', array('!proyecto' => $node->title, '!estado' =>$states[$current])));
    14551685  $output = '<p>'. t('Current state: !state', array('!state' => theme('workflow_current_state', $states[$current]))) . "</p>\n";
    14561686  unset($states[$current]);
    1457   $output .= drupal_get_form('workflow_tab_form', $node, $wid, $states, $current);
     1687
     1688
     1689  //$output .= '<div class="field-label"><b>' . t('Historico del Flujo de Trabajo') . ':</b>&nbsp;</div>';
     1690  $wid = workflow_get_workflow_for_type($node->type);
     1691  $states_per_page = variable_get('workflow_states_per_page', 20);
     1692  $result = db_query("SELECT sid, state FROM {workflow_states} WHERE status = 1 ORDER BY sid");
     1693  while ($data = db_fetch_object($result)) {
     1694    $states[$data->sid] = check_plain(t($data->state));
     1695  }
     1696  $deleted_states = array();
     1697  $result = db_query("SELECT sid, state FROM {workflow_states} WHERE status = 0 ORDER BY sid");
     1698  while ($data = db_fetch_object($result)) {
     1699    $deleted_states[$data->sid] = check_plain(t($data->state));
     1700  }
     1701  $current = workflow_node_current_state($node);
     1702  // theme_workflow_current_state() must run state through check_plain().
     1703  //$output .= '<p>'. t('Current state: !state', array('!state' => theme('workflow_current_state', $states[$current]))) . "</p>\n";
     1704  $result = db_query("SELECT h.*, u.name FROM {workflow_node_history} h LEFT JOIN {users} u ON h.uid = u.uid WHERE nid = %d ORDER BY hid DESC", $node->nid);
     1705  $rows = array();
     1706  while ($history = db_fetch_object($result)) {
     1707    if ($history->sid == $current && !isset($deleted_states[$history->sid]) && !isset($current_themed)) {
     1708      // Theme the current state differently so it stands out.
     1709      $state_name = theme('workflow_current_state', $states[$history->sid]);
     1710      // Make a note that we have themed the current state; other times in the history
     1711      // of this node where the node was in this state do not need to be specially themed.
     1712      $current_themed = TRUE;
     1713    }
     1714    elseif (isset($deleted_states[$history->sid])) {
     1715      // The state has been deleted, but we include it in the history.
     1716      $state_name = theme('workflow_deleted_state', $deleted_states[$history->sid]);
     1717      $footer_needed = TRUE;
     1718    }
     1719    else {
     1720      // Regular state.
     1721      $state_name = check_plain(t($states[$history->sid]));
     1722    }
     1723    if (isset($deleted_states[$history->old_sid])) {
     1724      $old_state_name = theme('workflow_deleted_state', $deleted_states[$history->old_sid]);
     1725      $footer_needed = TRUE;
     1726    }
     1727    else {
     1728      $old_state_name = check_plain(t($states[$history->old_sid]));
     1729    }
     1730    $rows[] = theme('workflow_history_table_row', $history, $old_state_name, $state_name);
     1731  }
     1732  $output .= theme('workflow_history_table', $rows, !empty($footer_needed));
     1733
     1734
     1735
     1736
     1737//print_r($states);
     1738  if (count($states)) {
     1739    $output .= drupal_get_form('workflow_tab_form', $node, $wid, $states, $current);
     1740  }
     1741  else {
     1742    drupal_set_title(t('El proyecto !proyecto se encuentra en el estado !estado', array('!proyecto' => $node->title, '!estado' =>$states[$current])));
     1743  }
     1744//echo "HOLA"; 
     1745//$output .= drupal_get_form('workflow_tab_form', $node, $wid, $states, $current);
    14581746  return $output;
    14591747}
     
    16201908    $arreglo['ip']['situaciono'] = array(
    16211909      'field_proyecto_so_descripcion' => 'field_proyecto_so_descripcion',
    1622       'field_proyecto_so_cuantificacion' => 'field_proyecto_so_cuantificacion',
    16231910      'field_proyecto_tiempoi' => 'field_proyecto_tiempoi',
    16241911    );
     
    16291916  $arreglo['ip']['resultadop'] = array(
    16301917    'field_proyecto_descripcion_bien' => 'field_proyecto_descripcion_bien',
     1918    'field_proyecto_so_cuantificacion' => 'field_proyecto_so_cuantificacion',
    16311919    'field_proyecto_unidadm' => 'field_proyecto_unidadm',
    16321920    'field_proyecto_meta_m' => 'field_proyecto_meta_m',
     
    20222310    );
    20232311
    2024     $arreglo['otros']['proyectos_operativos_flujo'] = t('Flujo de Trabajo');
     2312    $arreglo['otros']['proyectos_operativos_flujo'] = t('Historico del Flujo de Trabajo');
    20252313    //Indicador del resultado del Proyecto
    20262314    $form['otros']['fl'] = array(
     
    20282316      '#options' => $arreglo['otros'],
    20292317      '#default_value' => array(),
    2030       '#title' => t('Flujo de Trabajo'),
     2318      '#title' => t('Historico del Flujo de Trabajo'),
    20312319      '#multiple' => TRUE,
    20322320      '#weight' => 99,
    20332321    );
    2034     $title_combos['fl']['title'] = t('Flujo de Trabajo');
     2322    $title_combos['fl']['title'] = t('Historico del Flujo de Trabajo');
    20352323    $form['#title_combos'] = $title_combos;
    20362324    //$campos['proyectos_operativos_flujo'] = t('Flujo de Trabajo');
     
    21772465        }
    21782466      }
    2179    }
    2180 
     2467    }
     2468    //mostrar por defecto el formulario de busqueda.
     2469    unset($_SESSION['proyectos_operativos_mostrar_campos'][$node->nid]);
    21812470  }
    21822471  if (count($views)) {
     
    22372526  }
    22382527  if ($fecha && $ente->nid) {
     2528    muestra_mensaje($tipo_plan, $ente_planificador, 0);
     2529  }
     2530  if ($fecha && (is_numeric($ente_planificador) && user_access('admin all planificador'))) { //usuarios administradores
     2531    muestra_mensaje($tipo_plan, $ente_planificador, 0);
     2532  }
     2533  $rol_macro = variable_get('ActorPlanificadorMacro', 0);
     2534  if ($fecha && in_array($rol_macro, array_keys($user->roles))) { //es usuario control
    22392535    muestra_mensaje($tipo_plan, $ente_planificador, 0);
    22402536  }
     
    23962692    if (_proyectos_operativos_edita_datos_ae_access($node_accion)) {
    23972693      $links['proyecto_ae_update'] = array(
    2398         'data' => l(t('Agregar Acción Específica'), 'proyectosopedit/' . $proyecto->nid . '/ae'),
     2694        'data' => l(t('Modificar las Acciones Específicas'), 'proyectosopedit/' . $proyecto->nid . '/ae'),
     2695        //'data' => l(t('Agregar Acción Específica'), 'proyectosopedit/' . $proyecto->nid . '/ae'),
    23992696        'class' => 'proyectos-operativos-ae-modificar',
    24002697      );
     
    24092706  if (_proyectos_operativos_edita_datos_wk_access($node_accion)) {
    24102707    $links['proyecto_state'] = array(
    2411       'data' => l(t('Cambiar el estado'), 'proyectosop/' . $proyecto->nid . '/workflow'),
     2708      'data' => l(t('Revisión del Proyecto'), 'proyectosop/' . $proyecto->nid . '/workflow'),
    24122709      'class' => 'proyectos-operativos-estado',
    24132710    );
     
    38784175    $arreglo = array(
    38794176      'field_proyecto_so_descripcion' => 'field_proyecto_so_descripcion',
    3880       'field_proyecto_so_cuantificacion' => 'field_proyecto_so_cuantificacion',
    38814177      'field_proyecto_tiempoi' => 'field_proyecto_tiempoi',
    38824178    );
     
    39124208  $arreglo = array();
    39134209  $arreglo['field_proyecto_descripcion_bien'] = 'field_proyecto_descripcion_bien';
     4210  $arreglo['field_proyecto_so_cuantificacion'] = 'field_proyecto_so_cuantificacion';
    39144211  $arreglo['field_proyecto_unidadm'] = 'field_proyecto_unidadm';
    39154212  $personas = variable_get('proyectos_operativos_allow_unidpersona', array());
     
    40244321      form_set_error('field_proyecto_meta_fisica', t('La Distribución de la Meta Fisíca del Proyecto debe tener al menos un resultado'));
    40254322    }
     4323
     4324    if ($form_state['values']['field_proyecto_so_cuantificacion'][0]['value'] != $suma) {
     4325      form_set_error('field_proyecto_so_cuantificacion', t('La cuantificación de la Meta del Proyectos debe ser igual a la Distribución de la Meta Fisíca'));
     4326    }
     4327
     4328
     4329
    40264330    $personas = $form['#personas'];
    40274331    if (count($personas) && isset($personas[$form_state['values']['field_proyecto_unidadm'][0]['value']])) {
     
    43024606    }
    43034607    $row = array();
    4304     $row[] = array('data' => '<b>' . t('TOTAL') . '</b>', 'align' => 'right');
     4608    $row[] = array('data' => '<b>' . t('TOTAL DEL PROYECTO') . '</b>', 'align' => 'right');
    43054609    $suma = 0;
    43064610    foreach($ftypes as $valor) {
    4307       $row[] = array('data' => number_format($suma_mes[$valor], $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']), 'align' => 'center');
     4611      $row[] = array('data' => '<b>' . number_format($suma_mes[$valor], $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']) . '</b>', 'align' => 'center');
    43084612      $suma += $suma_mes[$valor];
    43094613    }
    43104614    $style = '';
    43114615    if ($suma != $proyecto->field_proyecto_monto_anual[0]['value']) {
    4312       $style = 'color: red';
    4313     }
    4314     $row[] = array('data' => number_format($suma, $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']), 'align' => 'center', 'style' => $style);
     4616      $style = '';
     4617    }
     4618    $row[] = array('data' => '<b>' . number_format($suma, $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']) . '</b>', 'align' => 'center', 'style' => $style);
    43154619    $rows[] = $row;
    43164620  }
     
    43194623    $row[] = array('data' => t('No existen acciones especificas'), 'colspan' => 12, 'align' => 'center');
    43204624  }
    4321   $output .= '<fieldset><legend>' . t('Resumen financiero de las acciones') . '</legend>' .   '<div class="field-label"><b>' . t('Monto total para el año en curso:') . '</b> ' . number_format($proyecto->field_proyecto_monto_anual[0]['value'], $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']) . '</div>' . theme('table', array(), $rows) . '</fieldset>';
     4625  $output .= '<fieldset><legend>' . t('Resumen financiero de las acciones') . '</legend>' .   '<div class="field-label"><b>' . t('Monto total del proyecto para el año en curso:') . '</b> ' . number_format($proyecto->field_proyecto_monto_anual[0]['value'], $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']) . '</div>' . theme('table', array(), $rows) . '</fieldset>';
    43224626  $rows = array();
    43234627  $row = array();
     
    43574661    }
    43584662    $row = array();
    4359     $row[] = array('data' => '<b>' . t('TOTAL') . '</b>', 'align' => 'right');
     4663    $row[] = array('data' => '<b>' . t('TOTAL DEL PROYECTO') . '</b>', 'align' => 'right');
    43604664    $suma = 0;
    43614665    foreach($partidas as $valor) {
    4362       $row[] = array('data' => number_format($suma_mes[$valor], $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']), 'align' => 'center');
     4666      $row[] = array('data' => '<b>' . number_format($suma_mes[$valor], $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']) . '</b>', 'align' => 'center');
    43634667      $suma += $suma_mes[$valor];
    43644668    }
    43654669    $style = '';
    43664670    if ($suma != $proyecto->field_proyecto_monto_anual[0]['value']) {
    4367       $style = 'color: red';
    4368     }
    4369     $row[] = array('data' => number_format($suma, $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']), 'align' => 'center', 'style' => $style);
     4671      $style = '';
     4672    }
     4673    $row[] = array('data' => '<b>' . number_format($suma, $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']) . '</b>', 'align' => 'center', 'style' => $style);
    43704674    $rows[] = $row;
    43714675  }
     
    43744678    $row[] = array('data' => t('No existen acciones especificas'), 'colspan' => 12, 'align' => 'center');
    43754679  }
    4376   $output .= '<fieldset><legend>' . t('Distribución por partida presupuestaria') . '</legend>' .   '<div class="field-label"><b>' . t('Monto total para el año en curso:') . '</b> ' . number_format($proyecto->field_proyecto_monto_anual[0]['value'], $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']) . '</div>' . theme('table', array(), $rows) . '</fieldset>';
     4680  $output .= '<fieldset><legend>' . t('Distribución por partida presupuestaria') . '</legend>' .   '<div class="field-label"><b>' . t('Monto total del proyecto para el año en curso:') . '</b> ' . number_format($proyecto->field_proyecto_monto_anual[0]['value'], $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']) . '</div>' . theme('table', array(), $rows) . '</fieldset>';
    43774681  $rows = array();
    43784682  $row = array();
     
    44044708  $row[] = array('data' => '<b>' . t('TOTAL FUENTES DE FINANCIAMIENTO') . ': </b>' .  number_format($total_total, $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']), 'align' => 'center', 'colspan' => count($arreglo_financiamiento));
    44054709  $rows[] = $row;
    4406   $output .= '<fieldset><legend>' . t('Fuentes de financiamiento') . '</legend>' .   '<div class="field-label"><b>' . t('Monto total para el año en curso:') . '</b> ' . number_format($proyecto->field_proyecto_monto_anual[0]['value'], $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']) . '</div>' . theme('table', array(), $rows) . '</fieldset>';
    4407   if (_proyectos_operativos_access_editar($proyecto)) {
     4710  $output .= '<fieldset><legend>' . t('Fuentes de financiamiento') . '</legend>' .   '<div class="field-label"><b>' . t('Monto total del proyecto para el año en curso:') . '</b> ' . number_format($proyecto->field_proyecto_monto_anual[0]['value'], $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']) . '</div>' . theme('table', array(), $rows) . '</fieldset>';
     4711//  if (_proyectos_operativos_access_editar($proyecto)) {
     4712  if (_proyectos_operativos_edita_datos_wk_access($proyecto)) {
    44084713    $output .= _proyectos_operativos_proyecto_ver_workflow($proyecto);
    44094714  }
     
    47215026  $output .= drupal_render($form['field_proyecto_descripcion_bien']);
    47225027  $output .= drupal_render($form['field_proyecto_unidadm']);
     5028  $output .= drupal_render($form['field_proyecto_so_cuantificacion']);
    47235029  if (isset($form['field_proyecto_meta_m']) && $form['field_proyecto_meta_f']) {
    47245030    $output .= '<div id="meta-unidm-pers"><table id="unidm-persona" style="width:400px"><tr><th>' . $form['field_proyecto_meta_m']['#title'] . '</th><th>' . $form['field_proyecto_meta_f']['#title'] . '</th><th>' . t('Total') . '</th></tr><tr>';
Nota: Vea TracChangeset para ayuda en el uso del visor de conjuntos de cambios.