Conjunto 1b09bdc en sipp
- Fecha y hora:
- 26/06/2014 15:08:51 (hace 10 años)
- Branches:
- master, drupal-7.x
- Children:
- ef46558
- Parents:
- d436359
- Ubicación:
- modules/acciones_centralizadas
- Ficheros:
-
- 2 editados
Leyenda
- No modificado
- Añadido
- Eliminado
-
modules/acciones_centralizadas/acciones_centralizadas.module
r903b515 r1b09bdc 458 458 $campo = acciones_centralizadas_menu_campo_load($campo); 459 459 } 460 $hay_campos = FALSE; 460 461 if (is_array($campo) && isset($campo['values']) && count($campo['values'])) { 461 462 foreach($campo['values'] as $partida) { 463 $hay_campos = TRUE; 462 464 $suma += $partida[$valor_texto]; 463 465 } 464 466 } 465 if (!$suma) {467 if (!$hay_campos) { 466 468 return FALSE; 467 469 } 470 468 471 $roles_allow = variable_get('acciones_centralizadas_state_s_' . $seguimiento['estado'], array()); 469 472 if ($user->uid == 1) { … … 502 505 $estado_aprobado = variable_get('acciones_centralizadas_state_aprobado', NULL); 503 506 $estado_naprobado = variable_get('acciones_centralizadas_state_naprobado', NULL); 507 504 508 if ($reformulacion->estado == $estado_naprobado || $reformulacion->estado == $estado_aprobado) { 505 509 return FALSE; 506 510 } 511 507 512 $states = _acciones_centralizadas_reformula_obtiene_estados(); 508 513 $first_state = 0; … … 1107 1112 $row[] = array('data' => number_format($min, $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']),); 1108 1113 $row1[] = array('data' => $sing . number_format($valor, $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']),); 1109 $totales_partidas_total += (float) $valor;1114 // $totales_partidas_total += (float) $valor; 1110 1115 $row2[] = array('data' => number_format($min + $valor, $format_number['decimals'], $format_number['dec_point'], $format_number['thousands_sep']),); 1111 1116 } … … 1127 1132 if(count($rows)) { 1128 1133 $row = array(); 1129 print_r($totales_partidas); 1134 1130 1135 $row[] = array('data' => '<b>' . t('TOTAL') . '</b>', 'align' => 'right', 'colspan' => $show_variacion ? 2 : 1); 1131 1136 foreach($ftypes as $id_field => $texto) { … … 1576 1581 $i = 1; 1577 1582 foreach($ftypes as $id_field => $texto) { 1578 $disabled = ($i < $mes)? TRUE : FALSE; 1583 $disabled = FALSE; 1584 // $disabled = ($i < $mes)? TRUE : FALSE; 1579 1585 $total += $partida[$id_field]; 1580 1586 $varia = isset($variaciones[$id][$partida['tid']][$id_field]) ? $variaciones[$id][$partida['tid']][$id_field] : 0; … … 1588 1594 '#type' => 'textfield', 1589 1595 '#default_value' => $valor, 1590 '#size' => 5,1596 '#size' => 15, 1591 1597 '#disabled' => $disabled, 1592 1598 '#attributes' => array('class' => $id . '_m' . ($i - 1) . 'p_' . $partida['tid'] . '_field ' . $id . '_' . $partida['tid'] . 'r ' . $id . '_m' . ($i - 1) . '_field ' . $id . '_dato_field numberref', 'onchange' => "valminimo('" . $idformuj . "', '" . $min . "');sumaref('" . $id . '_' . $partida['tid'] . 'r' . "');sumatexto('" . $id . '_m' . ($i - 1) . 'p_' . $partida['tid'] . '_field' . "');sumatexto('" . $id . '_m' . ($i - 1) . '_field' . "');sumatexto('" . $id . '_dato_field' . "');sumatoria_textos('" . $id .'p' . $partida['tid'] . '_field' . "');", 'valor' => $min, 'partida_campo' => $id . '_m' . ($i - 1) . 'p_' . $partida['tid'] . '_field'), … … 1598 1604 '#type' => 'textfield', 1599 1605 '#default_value' => $total1, 1600 '#size' => 5,1606 '#size' => 15, 1601 1607 '#disabled' => TRUE, 1602 1608 '#attributes' => array('class' => $id . '_' . $partida['tid'] . 'r' . '_total totales'), … … 1699 1705 $output .= drupal_render($form['group_ac_ac1']['field_ac_ac1_ae1']); 1700 1706 unset($form['group_ac_ac1']); 1701 $output .= '<div style="width: 1250px">';1707 $output .= '<div style="width:2250px">'; 1702 1708 $i = -1; 1703 1709 foreach ($ftypes as $ftype => $label) { 1704 1710 if($ftype != 'tid') { 1705 $output .= '<div class = "field_ac_ac1_ae1_m' . $i . '_field_total field_ac_ac1_ae1_totales" style = "width: 60px;float:left;margin-left:18px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">0</div>';1711 $output .= '<div class = "field_ac_ac1_ae1_m' . $i . '_field_total field_ac_ac1_ae1_totales" style = "width:140px;float:left;margin-left:13px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">0</div>'; 1706 1712 } 1707 1713 else { 1708 $output .= '<div style = "width:170px;float:left;margin-left: 5px;text-align:right"><b>' . t('TOTAL') . '</b></div>';1714 $output .= '<div style = "width:170px;float:left;margin-left:18px;text-align:right"><b>' . t('TOTAL') . '</b></div>'; 1709 1715 } 1710 1716 $i++; 1711 1717 } 1712 $output .= '<div class = "field_ac_ac1_ae1_dato_field_total number1" style = "width: 60px;float:left;margin-left:18px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">5000</div>';1718 $output .= '<div class = "field_ac_ac1_ae1_dato_field_total number1" style = "width:140px;float:left;margin-left:13px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">5000</div>'; 1713 1719 $output .= '</div></fieldset>'; 1714 1720 $form_aux['field_ac_ac2_ae2'] = $form['group_ac_ac2']['field_ac_ac2_ae2']; … … 1716 1722 $output .= '<fieldset><legend>' . $form['group_ac_ac2']['#title'] . '</legend>'; 1717 1723 $output .= drupal_render($form['group_ac_ac2']['field_ac_ac1_ae2']); 1718 $output .= '<div style="width: 1250px">';1724 $output .= '<div style="width:2250px">'; 1719 1725 $i = -1; 1720 1726 foreach ($ftypes as $ftype => $label) { 1721 1727 if($ftype != 'tid') { 1722 $output .= '<div class = "field_ac_ac1_ae2_m' . $i . '_field_total field_ac_ac1_ae2_totales" style = "width: 60px;float:left;margin-left:18px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">0</div>';1728 $output .= '<div class = "field_ac_ac1_ae2_m' . $i . '_field_total field_ac_ac1_ae2_totales" style = "width:140px;float:left;margin-left:13px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">0</div>'; 1723 1729 } 1724 1730 else { 1725 $output .= '<div style = "width:170px;float:left;margin-left: 5px;text-align:right"><b>' . t('TOTAL') . '</b></div>';1731 $output .= '<div style = "width:170px;float:left;margin-left:18px;text-align:right"><b>' . t('TOTAL') . '</b></div>'; 1726 1732 } 1727 1733 $i++; 1728 1734 } 1729 $output .= '<div class = "field_ac_ac1_ae2_dato_field_total" style = "width: 60px;float:left;margin-left:18px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">0</div>';1735 $output .= '<div class = "field_ac_ac1_ae2_dato_field_total" style = "width:140px;float:left;margin-left:13px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">0</div>'; 1730 1736 $output .= '</div>'; 1731 1737 $output .= '<div style="clear:both; height:30px"></div>'; 1732 1738 $output .= drupal_render($form['group_ac_ac2']['field_ac_ac2_ae2']); 1733 $output .= '<div style="width: 1250px">';1739 $output .= '<div style="width:2250px">'; 1734 1740 $i = -1; 1735 1741 foreach ($ftypes as $ftype => $label) { 1736 1742 if($ftype != 'tid') { 1737 $output .= '<div class = "field_ac_ac2_ae2_m' . $i . '_field_total field_ac_ac2_ae2_totales" style = "width: 60px;float:left;margin-left:18px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">0</div>';1743 $output .= '<div class = "field_ac_ac2_ae2_m' . $i . '_field_total field_ac_ac2_ae2_totales" style = "width:140px;float:left;margin-left:13px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">0</div>'; 1738 1744 } 1739 1745 else { 1740 $output .= '<div style = "width:170px;float:left;margin-left: 5px;text-align:right"><b>' . t('TOTAL') . '</b></div>';1746 $output .= '<div style = "width:170px;float:left;margin-left:18px;text-align:right"><b>' . t('TOTAL') . '</b></div>'; 1741 1747 } 1742 1748 $i++; 1743 1749 } 1744 $output .= '<div class = "field_ac_ac2_ae2_dato_field_total" style = "width: 60px;float:left;margin-left:18px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">0</div>';1750 $output .= '<div class = "field_ac_ac2_ae2_dato_field_total" style = "width:140px;float:left;margin-left:13px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">0</div>'; 1745 1751 $output .= '</div>'; 1746 1752 $output .= '<div style="clear:both; height:30px"></div>'; 1747 1753 $output .= drupal_render($form['group_ac_ac2']['field_ac_ac2_ae3']); 1748 $output .= '<div style="width: 1250px">';1754 $output .= '<div style="width:2250px">'; 1749 1755 $i = -1; 1750 1756 foreach ($ftypes as $ftype => $label) { 1751 1757 if($ftype != 'tid') { 1752 $output .= '<div class = "field_ac_ac2_ae3_m' . $i . '_field_total field_ac_ac2_ae3_totales" style = "width: 60px;float:left;margin-left:18px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">0</div>';1758 $output .= '<div class = "field_ac_ac2_ae3_m' . $i . '_field_total field_ac_ac2_ae3_totales" style = "width:140px;float:left;margin-left:13px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">0</div>'; 1753 1759 } 1754 1760 else { 1755 $output .= '<div style = "width:170px;float:left;margin-left: 5px;text-align:right"><b>' . t('TOTAL') . '</b></div>';1761 $output .= '<div style = "width:170px;float:left;margin-left:18px;text-align:right"><b>' . t('TOTAL') . '</b></div>'; 1756 1762 } 1757 1763 $i++; 1758 1764 } 1759 $output .= '<div class = "field_ac_ac2_ae3_dato_field_total" style = "width: 60px;float:left;margin-left:18px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">0</div>';1765 $output .= '<div class = "field_ac_ac2_ae3_dato_field_total" style = "width:140px;float:left;margin-left:13px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">0</div>'; 1760 1766 unset($form['group_ac_ac2']); 1761 1767 $output .= '</div></fieldset>'; … … 1763 1769 $output .= drupal_render($form['group_ac_ac3']['field_ac_ac3_ae1']); 1764 1770 unset($form['group_ac_ac3']); 1765 $output .= '<div style="width: 1250px">';1771 $output .= '<div style="width:2250px">'; 1766 1772 $i = -1; 1767 1773 foreach ($ftypes as $ftype => $label) { 1768 1774 if($ftype != 'tid') { 1769 $output .= '<div class = "field_ac_ac3_ae1_m' . $i . '_field_total field_ac_ac3_ae1_totales" style = "width: 60px;float:left;margin-left:18px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">0</div>';1775 $output .= '<div class = "field_ac_ac3_ae1_m' . $i . '_field_total field_ac_ac3_ae1_totales" style = "width:140px;float:left;margin-left:13px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">0</div>'; 1770 1776 } 1771 1777 else { 1772 $output .= '<div style = "width:170px;float:left;margin-left: 5px;text-align:right"><b>' . t('TOTAL') . '</b></div>';1778 $output .= '<div style = "width:170px;float:left;margin-left:18px;text-align:right"><b>' . t('TOTAL') . '</b></div>'; 1773 1779 } 1774 1780 $i++; 1775 1781 } 1776 $output .= '<div class = "field_ac_ac3_ae1_dato_field_total" style = "width: 60px;float:left;margin-left:18px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">0</div>';1782 $output .= '<div class = "field_ac_ac3_ae1_dato_field_total" style = "width:140px;float:left;margin-left:13px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">0</div>'; 1777 1783 $output .= '</div></fieldset>'; 1778 1784 $output .= '<fieldset><legend>' . $form['group_ac_ac4']['#title'] . '</legend>'; 1779 1785 $output .= drupal_render($form['group_ac_ac4']['field_ac_ac4_ae1']); 1780 1786 unset($form['group_ac_ac4']); 1781 $output .= '<div style="width: 1250px">';1787 $output .= '<div style="width:2250px">'; 1782 1788 $i = -1; 1783 1789 foreach ($ftypes as $ftype => $label) { 1784 1790 if($ftype != 'tid') { 1785 $output .= '<div class = "field_ac_ac4_ae1_m' . $i . '_field_total field_ac_ac4_ae1_totales" style = "width: 60px;float:left;margin-left:18px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">0</div>';1791 $output .= '<div class = "field_ac_ac4_ae1_m' . $i . '_field_total field_ac_ac4_ae1_totales" style = "width:140px;float:left;margin-left:13px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">0</div>'; 1786 1792 } 1787 1793 else { 1788 $output .= '<div style = "width:170px;float:left;margin-left: 5px;text-align:right"><b>' . t('TOTAL') . '</b></div>';1794 $output .= '<div style = "width:170px;float:left;margin-left:18px;text-align:right"><b>' . t('TOTAL') . '</b></div>'; 1789 1795 } 1790 1796 $i++; 1791 1797 } 1792 $output .= '<div class = "field_ac_ac4_ae1_dato_field_total" style = "width: 60px;float:left;margin-left:18px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">0</div>';1798 $output .= '<div class = "field_ac_ac4_ae1_dato_field_total" style = "width:140px;float:left;margin-left:13px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">0</div>'; 1793 1799 $output .= '</div></fieldset>'; 1794 1800 $output .= drupal_render($form['field_acciones_ente']); … … 1862 1868 $row1[] = array('data' => drupal_render($form[$id_field . '_' . $field['tid'] . 'r_' . $id]),); 1863 1869 $total2 += $min + $value_box; 1864 $row2[] = array('data' => '<div class = "' . $id_field . '_m' . $i . 'p_' . $field['tid'] . '_field_total ' . $id_field . '_totales ' . $id_field . 'p' . $field['tid'] . '_field_totalesR' . '" style = "width: 60px;float:left;margin-left:1px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">' . number_format($min + $value_box, $form['#format_number']['format_number']['decimals'], $form['#format_number']['format_number']['dec_point'], $form['#format_number']['format_number']['thousands_sep']) . '</div>',);1870 $row2[] = array('data' => '<div class = "' . $id_field . '_m' . $i . 'p_' . $field['tid'] . '_field_total ' . $id_field . '_totales ' . $id_field . 'p' . $field['tid'] . '_field_totalesR' . '" style = "width:140px;float:left;margin-left:1px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">' . number_format($min + $value_box, $form['#format_number']['format_number']['decimals'], $form['#format_number']['format_number']['dec_point'], $form['#format_number']['format_number']['thousands_sep']) . '</div>',); 1865 1871 $i++; 1866 1872 } 1867 1873 $row[] = array('data' => number_format($total, $form['#format_number']['format_number']['decimals'], $form['#format_number']['format_number']['dec_point'], $form['#format_number']['format_number']['thousands_sep']),); 1868 1874 $row1[] = array('data' => drupal_render($form[$id_field . '_' . $field['tid'] . 'r_total']),); 1869 $row2[] = array('data' => '<div class = "' . $id_field . 'p_' . $field['tid'] . '_dato_field_total ' . $id_field . 'p' . $field['tid'] . '_field_dato_field_total' . '" style = "width: 60px;float:left;margin-left:1px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">' . number_format($total2, $form['#format_number']['format_number']['decimals'], $form['#format_number']['format_number']['dec_point'], $form['#format_number']['format_number']['thousands_sep']) . '</div>',);1875 $row2[] = array('data' => '<div class = "' . $id_field . 'p_' . $field['tid'] . '_dato_field_total ' . $id_field . 'p' . $field['tid'] . '_field_dato_field_total' . '" style = "width:140px;float:left;margin-left:1px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">' . number_format($total2, $form['#format_number']['format_number']['decimals'], $form['#format_number']['format_number']['dec_point'], $form['#format_number']['format_number']['thousands_sep']) . '</div>',); 1870 1876 $rows[] = $row; 1871 1877 $rows[] = $row1; … … 1882 1888 foreach($ftypes as $id =>$texto) { 1883 1889 $suma_partida += $totales_partidas[$id_field][$id]; 1884 $row[] = array('data' => '<div class = "' . $id_field . '_m' . $i . '_field_total ' . $id_field . '_totales ' . $id_field . '_totalesR" style = "width: 60px;float:left;margin-left:1px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">' . number_format($totales_partidas[$id_field][$id], $form['#format_number']['format_number']['decimals'], $form['#format_number']['format_number']['dec_point'], $form['#format_number']['format_number']['thousands_sep']) . '</div>',);1890 $row[] = array('data' => '<div class = "' . $id_field . '_m' . $i . '_field_total ' . $id_field . '_totales ' . $id_field . '_totalesR" style = "width:140px;float:left;margin-left:1px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">' . number_format($totales_partidas[$id_field][$id], $form['#format_number']['format_number']['decimals'], $form['#format_number']['format_number']['dec_point'], $form['#format_number']['format_number']['thousands_sep']) . '</div>',); 1885 1891 $i++; 1886 1892 } 1887 $row[] = array('data' => '<div class = "' . $id_field . '_dato_field_total" style = "width: 60px;float:left;margin-left:1px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">' . number_format($suma_partida, $form['#format_number']['format_number']['decimals'], $form['#format_number']['format_number']['dec_point'], $form['#format_number']['format_number']['thousands_sep']) . '</div>',);1893 $row[] = array('data' => '<div class = "' . $id_field . '_dato_field_total" style = "width:140px;float:left;margin-left:1px; border: 1px solid #D5D5D5;text-align:center;overflow:auto">' . number_format($suma_partida, $form['#format_number']['format_number']['decimals'], $form['#format_number']['format_number']['dec_point'], $form['#format_number']['format_number']['thousands_sep']) . '</div>',); 1888 1894 $rows[] = $row; 1889 1895 } … … 1945 1951 $i = 1; 1946 1952 foreach($ftypes as $ids =>$texto) { 1947 $disabled = ($i >= $form['#mes'])? TRUE : FALSE; 1953 $disabled = TRUE; 1954 // $disabled = ($i >= $form['#mes'])? TRUE : FALSE; 1948 1955 if ($disabled) { 1949 1956 $start = $form_state['values'][$id . '_' . $partida['tid'] .'r_' . $ids]; … … 1976 1983 if ($existe) { 1977 1984 form_set_error($id . '][' . $idf . '][tid', t('La nueva partida ya se encuentra en la planificación')); 1985 } 1986 } 1987 else { 1988 foreach($ftypes as $ids =>$texto) { 1989 if ($partida[$ids] && is_numeric($partida[$ids])) { 1990 $valida_valor = TRUE; 1991 } 1978 1992 } 1979 1993 } … … 2020 2034 $i = 1; 2021 2035 foreach($ftypes as $ids =>$texto) { 2022 $disabled = ($i >= $form['#mes'])? TRUE : FALSE; 2036 $disabled = TRUE; 2037 // $disabled = ($i >= $form['#mes'])? TRUE : FALSE; 2023 2038 $reformula = isset($form['#reformula'][$id][$partida['tid']][$ids]) ? $form['#reformula'][$id][$partida['tid']][$ids] : 0; 2024 2039 $total = $disabled ? $form_state['values'][$id . '_' . $partida['tid'] .'r_' . $ids] : $reformula; … … 2749 2764 $output .= '</table>'; 2750 2765 $links = array(); 2751 if ($fecha && $current_estado != $estado_aprobado && $current_estado != $estado_naprobado && $acceso && $suma > 0) {2766 if ($fecha && $current_estado != $estado_aprobado && $current_estado != $estado_naprobado && $acceso) { 2752 2767 $links[] = l(t('Modificar seguimiento'), 'node/' . $node->nid . '/seguimiento/' . $campo['field'] . '/' . $mes . '/edit'); 2753 2768 } … … 3010 3025 $suma += $valor; 3011 3026 $zonacritica = $valor ? $causadov/$valor : -1; 3012 $porczonacritica = $zonacritica >= 0 ? ($zonacritica * 100) . '%' : -1;3027 $porczonacritica = $zonacritica >= 0 ? number_format(($zonacritica * 100), $form['#format_number']['format_number']['decimals'], $form['#format_number']['format_number']['dec_point'], $form['#format_number']['format_number']['thousands_sep']) . '%' : -1; 3013 3028 $form[$partida['tid'] . '_asignado'] = array( 3014 3029 '#type' => 'textfield', … … 3018 3033 ); 3019 3034 $disabled = $valor == 0 ? TRUE : FALSE; 3035 $disabled = FALSE; 3020 3036 $form[$partida['tid'] . '_comprometido'] = array( 3021 3037 '#type' => 'textfield', … … 3839 3855 $mensaje = ''; 3840 3856 if ($mes != $mes_segu -1 || $node->anhoaccion_centralizada != $year) { 3841 $mensaje = '<div class ="nota-complementaria"><b>' . t('Nota complementaria') . ':</b> ' . t('Mes fuera del perÃodo de duración de la acción especÃfica.') . '</div>';3842 } 3843 $mensaje .= t('Para consultar las partidas de esta Acción especifica en el mes actual ir a ');3857 $mensaje = '<div class ="nota-complementaria"><b>' . t('Nota complementaria') . ':</b> ' . t('Mes fuera del perÃodo de duración de la acción centralizada.') . '</div>'; 3858 } 3859 $mensaje .= t('Para consultar las partidas de esta Acción Centralizada en el mes actual ir a '); 3844 3860 foreach($grupos as $id => $grupo) { 3845 3861 $tablas = array(); … … 3866 3882 $estado = isset($states['states'][$current_estado]) ? $states['states'][$current_estado] : t('No ingresado'); 3867 3883 $row[] = array('data' => $mes_texto, 'align' => 'center',); 3868 $etiquetas = isset($states['states'][$current_estado]) ? '<div class="semaforo semaforo -' . $current_estado . '">â¢</div>' : '-';3884 $etiquetas = isset($states['states'][$current_estado]) ? '<div class="semaforo semaforo' . $current_estado . '">â¢</div>' : '-'; 3869 3885 $row[] = array('data' => $etiquetas, 'align' => 'center',); 3870 3886 $row[] = array('data' => $estado, 'align' => 'center',); … … 3872 3888 $transitions = array(); 3873 3889 $texto_value = $mes == 0 ? 'value' : 'value_' . $mes; 3874 if ( $suma[$texto_value] &&_acciones_centralizadas_seguimiento_node_tab_mes_access($node, $id_field, $mes)) {3890 if (_acciones_centralizadas_seguimiento_node_tab_mes_access($node, $id_field, $mes)) { 3875 3891 $links[] = l(t('Modificar seguimiento'), 'node/' . $node->nid . '/seguimiento/' . $id_field . '/' . $mes . '/edit', array('query' => array('destination' => $_GET['q']))); 3876 3892 } … … 3887 3903 $rows[] = $row; 3888 3904 3889 $tablas[]= '<div class="field-label">' . $field_load['widget']['label'] . '</div>' . theme('table', $header, $rows) . $mensaje . l(t('Seguimiento de la Acción EspecÃfica'), 'node/' . $node->nid . '/seguimiento/' . $id_field . '/' . $mes . '/view') . '<br>';3905 $tablas[]= '<div class="field-label">' . $field_load['widget']['label'] . '</div>' . theme('table', $header, $rows) . $mensaje . l(t('Seguimiento de la Acción Centralizada'), 'node/' . $node->nid . '/seguimiento/' . $id_field . '/' . $mes . '/view') . '<br>'; 3890 3906 } 3891 3907 } -
modules/acciones_centralizadas/js/acciones_centralizadas.js
r903b515 r1b09bdc 135 135 } 136 136 }); 137 /* 137 138 138 sumatexto('field_ac_ac1_ae1_dato_field'); 139 139 sumatexto('field_ac_ac1_ae2_dato_field'); … … 142 142 sumatexto('field_ac_ac3_ae1_dato_field'); 143 143 sumatexto('field_ac_ac4_ae1_dato_field'); 144 */ 144 145 145 for (i = 0; i < 12;i++) { 146 146 sumatexto('field_ac_ac1_ae1_m' + i + '_field'); … … 151 151 sumatexto('field_ac_ac4_ae1_m' + i + '_field'); 152 152 } 153 153 154 sumatoria_textos('field_ac_ac1_ae1'); 154 155 sumatoria_textos('field_ac_ac1_ae2'); … … 157 158 sumatoria_textos('field_ac_ac3_ae1'); 158 159 sumatoria_textos('field_ac_ac4_ae1'); 160 159 161 $("#node-form, #acciones-centralizadas-reformula-tab-page-form, #acciones-centralizadas-seguimiento-tab-page-form").submit(function( event ) { 160 162 $(".number, .numberref").each(function() { … … 217 219 } 218 220 else { 221 /* 219 222 $('#edit-' + partida + '-porcen').val('N/A'); 220 223 var estilo = $('#' + partida + '-inversion-form'). attr('style'); 221 224 estilo += ';background:' + Drupal.settings.acciones_centralizadas[0]['color'] + ';color:' + Drupal.settings.acciones_centralizadas[0]['tcolor']; 222 225 $('#' + partida + '-inversion-form'). attr('style', estilo); 226 */ 227 if (causado > 0) { 228 $('#' + partida + '-inversion-form').html(Drupal.settings.acciones_centralizadas[5]['texto']); 229 $('#edit-' + partida + '-porcen').val('N/D'); 230 var estilo = $('#' + partida + '-inversion-form'). attr('style'); 231 estilo += ';background:' + Drupal.settings.acciones_centralizadas[5]['color'] + ';color:' + Drupal.settings.acciones_centralizadas[5]['tcolor']; 232 $('#' + partida + '-inversion-form'). attr('style', estilo); 233 } 234 else { 235 $('#edit-' + partida + '-porcen').val('N/A'); 236 var estilo = $('#' + partida + '-inversion-form'). attr('style'); 237 estilo += ';background:' + Drupal.settings.acciones_centralizadas[0]['color'] + ';color:' + Drupal.settings.acciones_centralizadas[0]['tcolor']; 238 $('#' + partida + '-inversion-form'). attr('style', estilo); 239 } 223 240 } 224 241 } … … 275 292 var valor = 0; 276 293 var valores = 0; 294 var entra = false; 277 295 $('.' + clase + '_totalesR').each(function() { 296 entra = true; 278 297 valor = parseFloat($(this).html().replace(/[Drupal.settings.format_number.thousands_sep\s]/g, '').replace(/[Drupal.settings.format_number.dec_point\s]/g, '.')); 279 298 if (isNaN(valor) || !isFinite(valor)) { … … 289 308 }); 290 309 if (sum == 0){sum = '0';} 291 $('.' + clase + '_dato_field_total').html($.number(sum, Drupal.settings.format_number.decimals, Drupal.settings.format_number.dec_point, Drupal.settings.format_number.thousands_sep)); 292 } 310 if (entra == true) { 311 $('.' + clase + '_dato_field_total').html($.number(sum, Drupal.settings.format_number.decimals, Drupal.settings.format_number.dec_point, Drupal.settings.format_number.thousands_sep)); 312 } 313 }
Nota: Vea TracChangeset
para ayuda en el uso del visor de conjuntos de cambios.