function generar_td($cls, $issb = '')
    {
        $monto = sumar_ff_programado($this->sql);
        $td = '';
        $ftefto = $this->ftefto;
        for ($i = 0; $i < count($ftefto); $i++) {
            $id = $ftefto[$i];
            if ($monto[$id] == 0) {
                $monto[$id] = "&nbsp;";
            }
            $td .= '<td class="' . $cls . '" valign="top" nowrap align="right">' . $monto[$id] . '</td>';
        }
        if (!empty($issb)) {
            $meta = suma_meta_anp_subactividad($issb, $this->SqlFts, true);
        }
        /*if (!empty($this->sqlobj)){
        			$txtobj=ObjetivoEstrategico($this->sqlobj);
        		}*/
        $td = ' <td class="' . $cls . '" valign="top"  >&nbsp;' . $issb[resultado_esperado_asignacion] . '</td>
				  <td class="' . $cls . '" valign="top" >&nbsp;' . $issb[medio_verificacion_tarea] . '</td>
				  <td class="' . $cls . '" valign="top" nowrap align="right">' . num_format($meta[cantidad][0]) . '</td>
				  <td class="' . $cls . '" valign="top" nowrap align="right">' . $monto[0] . '</td>' . $td . '
				  </tr>';
        return $td;
    }
    function generar_td($ftefto, $cls, $issub = '')
    {
        $monto = sumar_trimestral_programado($this->sql, $this->md);
        if (is_array($issub)) {
            $metas = suma_meta_anp_subactividad($issub, $this->SqlFts, true);
        }
        // print_r($metas);
        for ($i = 0; $i < 5; $i++) {
            $monto[$i] = number_format($monto[$i], 2, ".", ",");
            if (empty($monto[$i])) {
                $monto[$i] = "&nbsp;";
            }
            if (empty($metas[cantidad][$i])) {
                $metas[cantidad][$i] = "&nbsp;";
            }
            $td .= '<td class="' . $cls . '"  nowrap="nowrap" valign="top" align="right">' . $metas[cantidad][$i] . '</td>
         	 	 <td class="' . $cls . '"  nowrap="nowrap" valign="top" align="right">' . $monto[$i] . '</td>';
        }
        $td = '<td class="' . $cls . '" valign="top" >&nbsp;' . $issub[medio_verificacion_tarea] . '</td>
				  ' . $td . '</tr>
				  ';
        return $td;
    }
 function reporte_meta_sa($rowsa)
 {
     return suma_meta_anp_subactividad($rowsa, '', true);
 }
Example #4
0
    function registro_actividad($prg, $sbprg, $actividad, $ftefto)
    {
        //$cls="tdact";
        $chkmeses = chekar_cronogramas_anp_suba($actividad, $this->SqlFts);
        $meta = suma_meta_anp_subactividad($actividad, $this->SqlFts, true);
        //if($meta[cantidad][0]){
        //print_r($sbprg);
        $filtro = " AND aoesp.id_anp_objetivo_especifico='" . $sbprg[id_anp_objetivo_especifico] . "'";
        $campo = " t.id_tarea";
        $cwhere = $filtro . " AND " . $campo . "='" . $actividad[id_tarea] . "'";
        $campogroup = $campo;
        $campoorder = $campo;
        $td_fuente = $this->generar_td_fuente($ftefto, $cls, $cwhere, $campogroup, $campoorder);
        //if($this->estado){
        echo '<tr><td class="' . $cls . '" valign="top" >' . $prg[codigo_objetivo_estrategico] . "." . $sbprg[codigo_objetivo_especifico] . "." . $actividad[nro_asignacion] . '</td>
						<td class="' . $cls . '" valign="top" >' . $actividad[nombre_tarea] . '</td>
						<td class="' . $cls . '" width="6%"  > &nbsp;' . $actividad[medio_verificacion_tarea] . '</td>
						<td class="' . $cls . '" width="6%" align="center" > ' . num_format($meta[cantidad][0]) . '</td>				
						' . $td_fuente;
        echo '<td class="' . $cls . '" width="2%" valign="top" align="center"
						nowrap="nowrap" >&nbsp;' . $chkmeses[1] . '&nbsp;</td>
							<td class="' . $cls . '" width="2%" valign="top" align="center" nowrap="nowrap">&nbsp;' . $chkmeses[2] . '&nbsp;</td>
							<td class="' . $cls . '" width="2%" valign="top" align="center" nowrap="nowrap">&nbsp;' . $chkmeses[3] . '&nbsp;</td>
							<td class="' . $cls . '" width="2%" valign="top" align="center" nowrap="nowrap">&nbsp;' . $chkmeses[4] . '&nbsp;</td>
							<td class="' . $cls . '" width="2%" valign="top" align="center" nowrap="nowrap">&nbsp;' . $chkmeses[5] . '&nbsp;</td>
							<td class="' . $cls . '" width="2%" valign="top" align="center" nowrap="nowrap">&nbsp;' . $chkmeses[6] . '&nbsp;</td>
							<td class="' . $cls . '" width="2%" valign="top" align="center" nowrap="nowrap">&nbsp;' . $chkmeses[7] . '&nbsp;</td>
							<td class="' . $cls . '" width="2%" valign="top" align="center" nowrap="nowrap">&nbsp;' . $chkmeses[8] . '&nbsp;</td>
							<td class="' . $cls . '" width="2%" valign="top" align="center" nowrap="nowrap">&nbsp;' . $chkmeses[9] . '&nbsp;</td>
							<td class="' . $cls . '" width="2%" valign="top" align="center" nowrap="nowrap">&nbsp;' . $chkmeses[10] . '&nbsp;</td>
							<td class="' . $cls . '" width="2%" valign="top" align="center" nowrap="nowrap">&nbsp;' . $chkmeses[11] . '&nbsp;</td>
							<td class="' . $cls . '" width="2%" valign="top" align="center" nowrap="nowrap">&nbsp;' . $chkmeses[12] . '&nbsp;</td>
					</tr>';
        //}
    }