$ld_agno_dia=date("Y");
   $ld_agno_periodo=substr($ls_periodo,0,4);
   $li_total=0;
   $object="";
   /*if($ld_agno_dia!=$ld_agno_periodo)
   {
		$io_msg->message("El Año del periodo es distinto al del año del sistema ir a Configuracion/Empresa/Periodo .....");
		print "<script language=JavaScript>";
		print "location.href='../index_modules.php'";
		print "</script>";		
   }*/
   $as_estmodape="";
   $lb_valido=$io_class_aper->uf_spg_select_modalidad_apertura($ls_codemp,$as_estmodape);
   if(($lb_valido)&&($as_estmodape==0))
   { 
	   $io_class_grid->make_gridScroll($li_total,$title,$object,610,'APERTURA',$ls_nombre,50);     
	   $lb_valido=$io_class_aper->uf_spg_procesar_apertura($la_seguridad);
   }
   elseif($as_estmodape==1)
   {
			?>
            <script language="javascript">
			alert("La Apertura ha sido configurada Trimestral......");
			f=document.form1;
			f.action="sigespwindow_blank.php";
			f.submit();
            </script>
            <?php
   }
}
    $data=$io_sql->obtener_datos($rs_load);
    $ds_aper->data=$data;
    $li_num=$ds_aper->getRowCount("codfuefin");
    $li_totnum=$li_num;
    for($i=1;$i<=$li_num;$i++)
    {    
        $ls_codfuefin = $data["codfuefin"][$i]; 
		$ls_denfuefin = $data["denfuefin"][$i];
		$ld_monto =number_format($data["monto"][$i],2,",",".");
		$object[$i][1]="<input type=text name=txtCodfuefin".$i." value=$ls_codfuefin class=sin-borde readonly><input name=codfuefin".$i." type=hidden id=codfuefin value='$ls_codfuefin'>";
		$object[$i][2]="<input type=text name=txtDenfuefin".$i." value='$ls_denfuefin' size=50 class=sin-borde readonly >";
		$object[$i][3]="<input type=text name=txtMonto".$i." onBlur=uf_format(this,$i) onKeyPress='return keyRestrictgrid(event)'  onKeyUp='ue_validarcomas_puntos(this)' value=$ld_monto class=sin-borde style=text-align:right onClick='calcular_porasignar()'>";
		
    }//for
    //$io_class_grid->make_gridScroll($li_totnum,$title,$object,610,'DISTRIBUCION DE LA FUENTE DE FINANCIAMIENTO',$ls_nombre,245);     
	$io_class_grid->make_gridScroll($li_totnum,$title,$object,550,'DISTRIBUCION DE LA FUENTE DE FINANCIAMIENTO',$ls_nombre,150);     
  }//if
  else
  {
    $io_msg->message("No se han definido Fuentes de Financimiento para la Estructura Seleccionada");
	print "<script language='JavaScript'>";
	print "close()";
	print "</script>";
  }
 }
  
 if($ls_operacion=="GUARDARDISFUEFIN")
 {
   $li_num=$_POST["li_totnum"];
   $lb_valido=true;
   $lb_existe=true;
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td height="22" colspan="4"><div align="right"><a href="javascript:uf_load_movimientos_bancarios();"><img src="../shared/imagebank/tools20/buscar.gif" alt="Cargar Documentos..." width="20" height="20" border="0" longdesc="Carga los documentos xml dispuestos a generar los Movimientos Bancarios..." />Cargar Documentos</a></div></td>
    </tr>
    <tr>
      <td colspan="4"><div align="center">
        <?php $io_grid->make_gridScroll($li_totrows,$la_rowgri,$la_object,762,'Cobranza',"grid_cobranza",100); ?>
        <input name="hidtotrow" type="hidden" id="hidtotrow" value="<?php echo $li_totrows ?>" />
      </div></td>
    </tr>
  </table>
</form>
<p>&nbsp;</p>
</body>
<script>
f = document.form1;
function uf_load_movimientos_bancarios()
{
  if (uf_evaluate_cierre('SPI'))
     {
	   li_leer = f.leer.value;
	   if (li_leer==1)
				       $ls_estdoc = $row["estmov"];
				       $ls_codpro = $row["cod_pro"];
				       $ls_cedben = $row["ced_bene"];
				       $ls_tipdes = $row["tipo_destino"];
				       $ls_nombre = $row["nombre"];
				       $ls_conmov = $row["conmov"];
				       $ld_monmov = $row["monto"];
				       $ls_fecmov = $io_funcion->uf_formatovalidofecha($row["fecmov"]);
					   $ls_fecmov = $io_funcion->uf_convertirfecmostrar($ls_fecmov);
		               $object[$li_fila][1]="<input type=text      id=txtnumdoc".$li_fila."  name=txtnumdoc".$li_fila."  value='".$ls_numdoc."'  class=sin-borde  size=15  style=text-align:center readonly>";
					   $object[$li_fila][2]="<input type=text      id=txttipope".$li_fila."  name=txttipope".$li_fila."  value='".$ls_codope."'  class=sin-borde  size=5   style=text-align:center readonly>";
					   $object[$li_fila][3]="<input type=text      id=txtnombre".$li_fila."  name=txtnombre".$li_fila."  value='".$ls_nombre."'  class=sin-borde  size=40  style=text-align:left   readonly>"; 
					   $object[$li_fila][4]="<input type=text      id=txtfecha".$li_fila."   name=txtfecha".$li_fila."   value='".$ls_fecmov."'  class=sin-borde  size=8   style=text-align:center readonly>";
		               $object[$li_fila][5]="<input type=text      id=txtmonto".$li_fila."   name=txtmonto".$li_fila."   value='".number_format($ld_monmov,2,',','.')."'  class=sin-borde  size=20  style=text-align:right   readonly>";
				     }
		       $io_grid->make_gridScroll($li_fila,$title,$object,570,'Listado de Documentos',$ls_grid,200);
		  }
          else
	      {
	        $io_msg->message("No se han encontrado Documentos para este Criterio de Búsqueda !!!");
		  }
        }
   }    
?>
</p>
<div align="center">
  <input name="hidtotrows" type="hidden" id="hidtotrows" value="<?php print $li_totrows ?>">
</div>
</form>      
<p>&nbsp;</p>
<p>&nbsp;</p>
    <tr <? print $ls_anticipo ?>>
      <td height="13">&nbsp;</td>
      <td height="13" >
	      <input name="btnanticipo" type="button" class="boton" id="btnanticipo" value="Amortización Anticipo" onClick="ue_amortizar_anticipo();">	  </td>
      <td height="13" >&nbsp;</td>
      <td height="13" >&nbsp;</td>
    </tr>
    <tr>
      <td height="13">&nbsp;</td>
      <td height="13" >&nbsp;</td>
      <td height="13">&nbsp;</td>
      <td height="13">&nbsp;</td>
    </tr>
	
    <tr>                                              
      <td height="22" colspan="4"><div align="center"><?php $io_grid->make_gridScroll($li_rows,$title,$object,762,'Solicitudes Programadas',$grid,100);?>
        <input name="fila_selected" type="hidden" id="fila_selected">
        <input name="totalrows" type="hidden" id="totalrows" value="<?php print $li_rows;?>">
        <input name="operacion" type="hidden" id="operacion">
		<input name="status_doc" type="hidden" id="status_doc" value="<?php print $ls_estdoc;?>">
        <input name="estmov" type="hidden" id="estmov" value="<?php print $ls_estmov;?>">
        <input name="fuente" type="hidden" id="fuente" value="<?php print $ls_fuente;?>">
      </div></td>
    </tr>
    <tr>
      <td height="22" colspan="4">&nbsp;</td>
    </tr>
  </table>
  <p>&nbsp;</p>
  </form>
</body>
    </tr>
      <script language="javascript">uf_validar_estatus_mes();</script>
	<tr>
      <td height="22" style="text-align:right">Monto</td>
      <td height="22" style="text-align:left"><input name="txtmonto" type="text" id="txtmonto" style="text-align:right" size="22" readonly></td>
      <td height="22">&nbsp;</td>
      <td height="22">&nbsp;</td>
    </tr>
    <tr>
      <td height="22">&nbsp;&nbsp;</td>
      <td height="22"><a href="javascript:uf_procesar();"><img src="../shared/imagebank/aprobado.gif" alt="Aceptar" title="Aceptar" width="15" height="15" border="0">Procesar Programaci&oacute;n</a> <img src="../shared/imagebank/mas.gif" alt="Aplicar a Todas" width="9" height="17"><a href="javascript:uf_aplicar_all();">Aplicar Fecha a Todas</a> </td>
      <td height="22">&nbsp;</td>
      <td height="22">&nbsp;</td>
    </tr>
    <tr>                                              
      <td height="22" colspan="4"><div align="center"><?php $io_grid->make_gridScroll($li_totsolpag,$titleProg,$object,762,'Solicitudes a Programar ',$gridProg,120);?>
          <input name="totsol"  type="hidden" id="totsol"  value="<?php print $li_totsolpag; ?>">
          <input name="fila"    type="hidden" id="fila">
      </div></td>
    </tr>
    <tr>
      <td height="22">&nbsp;</td>
      <td height="22">&nbsp;</td>
      <td height="22" style="text-align:right"><strong>Total Programaci&oacute;n</strong></td>
      <td height="22" style="text-align:left"><input name="txttotalprog" type="text" id="txttotalprog" style="text-align:right" value="<?php print number_format($ldec_total_prog,2,",",".");?>" readonly></td>
    </tr>
  </table>
  <p>&nbsp;</p>
</form>
</body>
<script language="javascript">
function uf_cargar_dt_nota()
{
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //	     Function: uf_cargar_dt_nota
    //		   Access: public
    //	  Description: Funcion que carga los detalles de la nota
    //	   Creado Por: Ing. Nelson Barraez
    // Fecha Creacin: 29/05/2007 								Fecha Última Modificación : 03/06/2007
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    require_once "sigesp_cxp_c_ncnd.php";
    $io_ncnd = new sigesp_cxp_c_ncnd('../../');
    require_once "../../shared/class_folder/sigesp_include.php";
    $io_include = new sigesp_include();
    $io_conexion = $io_include->uf_conectar();
    require_once "../../shared/class_folder/class_sql.php";
    $io_sql = new class_sql($io_conexion);
    require_once "../../shared/class_folder/class_mensajes.php";
    $io_mensajes = new class_mensajes();
    require_once "../../shared/class_folder/class_funciones.php";
    $io_funciones = new class_funciones();
    require_once "../../shared/class_folder/grid_param.php";
    $io_grid = new grid_param();
    $ds_detscg = new class_datastore();
    global $io_funciones_cxp;
    $ls_modalidad = $_SESSION["la_empresa"]["estmodest"];
    $ls_confiva = $_SESSION["la_empresa"]["confiva"];
    $ls_codemp = $io_funciones_cxp->uf_obtenervalor("codemp", "");
    $ls_numncnd = trim($io_funciones_cxp->uf_obtenervalor("numncnd", ""));
    $ls_numord = $io_funciones_cxp->uf_obtenervalor("numord", "");
    $ls_numrecdoc = trim($io_funciones_cxp->uf_obtenervalor("numrecdoc", ""));
    $ls_codtipdoc = $io_funciones_cxp->uf_obtenervalor("codtipdoc", "");
    $ls_tipproben = $io_funciones_cxp->uf_obtenervalor("tipproben", "");
    $ls_codproben = trim($io_funciones_cxp->uf_obtenervalor("codproben", ""));
    $ld_fecha = $io_funciones_cxp->uf_obtenervalor("fecha", "");
    $ls_tiponota = $io_funciones_cxp->uf_obtenervalor("tiponota", "");
    $ldec_totaldebe = 0;
    $ldec_totalhaber = 0;
    $ldec_totalcargo = $ld_montotcre = 0;
    if (isset($_SESSION["la_crenotas"])) {
        unset($_SESSION["la_crenotas"]);
    }
    $ld_montotcre = $io_ncnd->uf_load_creditos_nota($ls_codemp, $ls_numncnd, $ls_numrecdoc, $ls_codtipdoc, $ls_numord, $ls_tiponota, $ls_tipproben, $ls_codproben);
    if ($ls_confiva == 'C') {
        $ldec_totalcargo = $ld_montotcre;
    }
    if ($ls_tipproben == 'P') {
        $ls_aux = " AND cxp.cod_pro='" . $ls_codproben . "' ";
    } elseif ($ls_tipo == 'B') {
        $ls_aux = " AND cxp.ced_bene='" . $ls_codproben . "' ";
    } else {
        $ls_aux = " AND cxp.cod_pro='----------' ";
    }
    if ($_SESSION["ls_gestor"] == "MYSQLT") {
        $ls_codestpro = " CONCAT(spg.codestpro1,spg.codestpro2,spg.codestpro3,spg.codestpro4,spg.codestpro5)";
    } else {
        $ls_codestpro = " (spg.codestpro1||spg.codestpro2||spg.codestpro3||spg.codestpro4||spg.codestpro5)";
    }
    $ls_sql = " SELECT cxp.*,spg.denominacion as dencta,spg.sc_cuenta,scg.denominacion as den_scg,DOC.estcon,DOC.estpre\n\t\t\t\t    FROM cxp_dc_spg cxp,spg_cuentas spg,scg_cuentas scg,cxp_documento DOC\n\t\t\t\t   WHERE cxp.codemp = '" . $ls_codemp . "'\n\t\t\t\t     AND cxp.numdc = '" . $ls_numncnd . "'   \n\t\t\t\t\t AND trim(cxp.numrecdoc) = '" . trim($ls_numrecdoc) . "' \n\t\t\t\t     AND cxp.numsol = '" . $ls_numord . "'\n\t\t\t\t\t AND cxp.codtipdoc='" . $ls_codtipdoc . "' {$ls_aux} \n\t\t\t\t\t AND cxp.codope='" . $ls_tiponota . "' \n\t\t\t\t     AND cxp.spg_cuenta=spg.spg_cuenta \n\t\t\t\t\t AND cxp.codestpro=" . $ls_codestpro . " \n\t\t\t\t\t AND cxp.codemp=scg.codemp \n\t\t\t\t\t AND spg.sc_cuenta=scg.sc_cuenta\n\t\t\t\t\t AND cxp.codtipdoc=DOC.codtipdoc";
    $rs_data = $io_sql->select($ls_sql);
    if ($rs_data === false) {
        $lb_valido = false;
    } else {
        $li = 0;
        $ldec_total = 0;
        $ldec_totalsincargo = 0;
        while ($row = $io_sql->fetch_row($rs_data)) {
            $li++;
            $ls_cuenta = trim($row["spg_cuenta"]);
            $ls_codestpro = $row["codestpro"];
            $ls_codestproaux = $ls_codestpro;
            $io_funciones_cxp->uf_formatoprogramatica($ls_codestpro, &$ls_programatica);
            switch ($ls_modalidad) {
                case "1":
                    // Modalidad por Proyecto
                    $ls_codestpro = substr($ls_codestpro, 0, 29);
                    break;
                case "2":
                    // Modalidad por Programa
                    $ls_codestpro1 = substr(substr($ls_codestpro, 0, 20), -2);
                    $ls_codestpro2 = substr(substr($ls_codestpro, 20, 6), -2);
                    $ls_codestpro3 = substr(substr($ls_codestpro, 26, 3), -2);
                    $ls_codestpro4 = substr($ls_codestpro, 29, 2);
                    $ls_codestpro5 = substr($ls_codestpro, 31, 2);
                    $ls_codestpro = $ls_codestpro1 . "-" . $ls_codestpro2 . "-" . $ls_codestpro3 . "-" . $ls_codestpro4 . "-" . $ls_codestpro5;
                    break;
            }
            $ls_dencuenta = utf8_encode($row["dencta"]);
            $ldec_monto = $row["monto"];
            $ldec_total = $ldec_total + abs($ldec_monto);
            if ($ls_tiponota == 'NC') {
                $ldec_monto = $ldec_monto * -1;
            }
            $ldec_monto = number_format($ldec_monto, 2, ",", ".");
            $ls_scgcuenta = trim($row["sc_cuenta"]);
            $ls_denctascg = $row["den_scg"];
            if ($ls_confiva == 'P') {
                if (uf_check_cargo($ls_numrecdoc, $ls_codtipdoc, $ls_codestproaux, $ls_cuenta, $ls_tipproben, $ls_codproben)) {
                    $ls_cargo = 'C';
                    $ldec_totalcargo += abs($row["monto"]);
                } else {
                    $ls_cargo = '';
                    $ldec_totalsincargo += abs($row["monto"]);
                }
            } elseif ($ls_confiva == 'C') {
                $ls_cargo = '';
                $ldec_totalsincargo += abs($row["monto"]);
            }
            $li_estcon = $row["estcon"];
            $li_estpre = $row["estpre"];
            $ls_estcla = $row["estcla"];
            $ls_estatus = "";
            switch ($ls_estcla) {
                case "A":
                    $ls_estatus = utf8_encode("Acción");
                    break;
                case "P":
                    $ls_estatus = utf8_encode("Proyecto");
                    break;
            }
            $lo_object2[$li][1] = "<input type=text name=txtcuentaspgncnd" . $li . " id=txtcuentaspgncnd" . $li . " class=sin-borde style=text-align:center size=22 value='{$ls_cuenta}' readonly onClick='javascript:uf_select_filadelete({$li});'><input type=hidden name=txtscgcuentadt" . $li . "    id=txtscgcuentadt" . $li . "  value='{$ls_scgcuenta}'><input type=hidden name=txtdenscgcuentadt" . $li . "    id=txtdenscgcuentadt" . $li . "  value='{$ls_denctascg}'><input type=hidden name=txtestcargo" . $li . "    id=txtestcargo" . $li . "  value='{$ls_cargo}'>";
            $lo_object2[$li][2] = "<input type=text name=txtcodestproncnd" . $li . " id=txtcodestproncnd" . $li . " class=sin-borde style=text-align:center   size=40 value='{$ls_programatica}'    readonly onClick='javascript:uf_select_filadelete({$li});'><input name=txtcodpro" . $li . " type=hidden id=txtcodpro" . $li . " value='" . $ls_codestproaux . "'>";
            $lo_object2[$li][3] = "<input type=text name=txtestclaaux" . $li . "     id=txtestclaaux" . $li . "     class=sin-borde style=text-align:center   size=20 value='{$ls_estatus}'    readonly onClick='javascript:uf_select_filadelete({$li});'><input name=txtestclancnd" . $li . " type=hidden id=txtestclancnd" . $li . " value='" . $ls_estcla . "'>";
            $lo_object2[$li][4] = "<input type=text name=txtdencuentancnd" . $li . " id=txtdencuentancnd" . $li . " class=sin-borde style=text-align:left size=39  value='{$ls_dencuenta}'       readonly onClick='javascript:uf_select_filadelete({$li});'>";
            $lo_object2[$li][5] = "<input type=text name=txtmontoncnd" . $li . "     id=txtmontoncnd" . $li . "     class=sin-borde style=text-align:right  size=20 value='" . $ldec_monto . "' readonly onClick='javascript:uf_select_filadelete({$li});uf_mostrar_alerta();'>";
            if ($li_estcon == 1 && ($li_estpre == 3 || $li_estpre == 4)) {
            } else {
                $lo_object2[$li][6] = "<a href=javascript:uf_delete_dtnota('" . $li . "');><img src=../shared/imagebank/tools15/eliminar.gif title=Eliminar width=15 height=10 border=0></a>";
            }
        }
        $io_sql->free_result($rs_data);
    }
    if ($ls_confiva == 'C') {
        $ldec_total += $ldec_totalcargo;
    }
    $ldec_total = number_format($ldec_total, 2, ",", ".");
    $ldec_totalsincargo = number_format($ldec_totalsincargo, 2, ",", ".");
    $ls_sql = " SELECT cxp.*,scg.denominacion as dencta,DOC.estcon,DOC.estpre\n\t\t\t\t    FROM cxp_dc_scg cxp,scg_cuentas scg,cxp_documento DOC\n\t\t\t\t   WHERE cxp.codemp = '" . $ls_codemp . "'\n\t\t\t\t     AND trim(cxp.numdc) = '" . trim($ls_numncnd) . "'\n\t\t\t\t\t AND trim(cxp.numrecdoc) = '" . trim($ls_numrecdoc) . "' \n\t\t\t\t     AND cxp.numsol='" . $ls_numord . "'\n\t\t\t\t\t AND cxp.codtipdoc='" . $ls_codtipdoc . "' {$ls_aux} \n\t\t\t\t\t AND cxp.codope='" . $ls_tiponota . "' \n\t\t\t\t     AND cxp.sc_cuenta=scg.sc_cuenta  \n\t\t\t\t\t AND cxp.codtipdoc=DOC.codtipdoc \n\t\t\t\t   ORDER BY cxp.estgenasi";
    $rs_data = $io_sql->select($ls_sql);
    if ($rs_data === false) {
        $lb_valido = false;
    } else {
        $la = 0;
        while ($row = $io_sql->fetch_row($rs_data)) {
            $la++;
            $ls_scgcuenta = trim($row["sc_cuenta"]);
            $ls_dencuenta = utf8_encode($row["dencta"]);
            $ls_debhab = $row["debhab"];
            $ldec_monto = number_format($row["monto"], 2, ",", ".");
            if ($ls_debhab == 'D') {
                $ldec_mondebe = $ldec_monto;
                $ldec_totaldebe = $ldec_totaldebe + $row["monto"];
                $ldec_monhaber = "0,00";
            } else {
                $ldec_monhaber = $ldec_monto;
                $ldec_totalhaber = $ldec_totalhaber + $row["monto"];
                $ldec_mondebe = "0,00";
            }
            $li_estcon = $row["estcon"];
            $li_estpre = $row["estpre"];
            $lo_object[$la][1] = "<input type=text name=txtscgcuentancnd" . $la . "    id=txtscgcuentancnd" . $la . " class=sin-borde style=text-align:center size=22 value='{$ls_scgcuenta}'    readonly>";
            $lo_object[$la][2] = "<input type=text name=txtdencuentascgncnd" . $la . "    class=sin-borde style=text-align:left   size=59 value='{$ls_dencuenta}'    readonly>";
            $lo_object[$la][3] = "<input type=text name=txtdebencnd" . $la . "    class=sin-borde style=text-align:right size=20  value='{$ldec_mondebe}'   readonly onClick='javascript:uf_mostrar_alerta();'>";
            $lo_object[$la][4] = "<input type=text name=txthaberncnd" . $la . "    class=sin-borde style=text-align:right  size=20 value='{$ldec_monhaber}' readonly onClick='javascript:uf_mostrar_alerta();'>";
            if ($li_estcon == 1 && ($li_estpre == 3 || $li_estpre == 4)) {
                $lo_object2[$li][5] = "<a href=javascript:uf_delete_dtnota('" . $li . "');><img src=../shared/imagebank/tools15/eliminar.gif title=Eliminar width=15 height=10 border=0></a>";
            }
        }
    }
    $lo_title[1] = "C&oacute;digo Estad&iacute;stico";
    $lo_title[2] = "C&oacute;digo Program&aacute;tico ";
    $lo_title[3] = "Estatus";
    $lo_title[4] = "Denominaci&oacute;n";
    $lo_title[5] = "Monto";
    if ($li_estcon == 1 && ($li_estpre == 3 || $li_estpre == 4)) {
    } else {
        $lo_title[6] = "\t";
    }
    $io_grid->make_gridScroll($li, $lo_title, $lo_object2, 758, "Detalle Presupuestario de la Nota", "grid", 120);
    $lo_titlesc[1] = "Cuenta";
    $lo_titlesc[2] = "Denominaci&oacute;n";
    $lo_titlesc[3] = "Monto Debe";
    $lo_titlesc[4] = "Monto Haber";
    if ($li_estcon == 1 && ($li_estpre == 3 || $li_estpre == 4)) {
        $lo_titlesc[5] = "\t";
    }
    $io_grid->make_gridScroll($la, $lo_titlesc, $lo_object, 758, "Detalle Contable de la Nota", "gridscg", 120);
    echo "<input type=hidden name=numrowsprenota id=numrowsprenota value=" . $li . ">";
    echo "<input type=hidden name=numrowsconnota id=numrowsconnota value=" . $la . ">";
    echo "<table width='758' border='0' align='center' cellpadding='0' cellspacing='0' class='celdas-blancas'>";
    echo "   <tr>";
    echo "      <td width='508' height='22' align='right'><div align='right'><strong>Total Debe</strong></div></td>";
    echo "      <td width='80'  height='22' align='right'><input name='txtmontodeb'  type='text' id='txtmontodeb' style='text-align:right' value=" . number_format($ldec_totaldebe, 2, ",", ".") . " size='22' maxlength='20' readonly align='right' class='letras-negrita'></td>";
    echo "      <td width='90'  height='22' align='right'><div align='right'><strong>Total Haber</strong></div></td>";
    echo "      <td width='80'  height='22' align='right'><input name='txtmontohab'  type='text' id='txtmontohab' style='text-align:right' value=" . number_format($ldec_totalhaber, 2, ",", ".") . " size='22' maxlength='20' readonly align='right' class='letras-negrita'></td>";
    echo "   </tr>";
    echo "        <tr>";
    echo "          <td width='508' height='22' align='right'>&nbsp;</td>";
    echo "          <td width='80' height='22' align='right'>&nbsp;</td>";
    echo "          <td width='90' height='22' align='right'>&nbsp;</td>";
    echo "          <td width='80' height='22' align='right'>&nbsp;</td>";
    echo "        </tr>";
    echo "</table>";
    echo "<table width=780 border=0 cellpadding=0 cellspacing=0 class=formato-blanco>";
    echo " <tr class=titulo-ventana>";
    echo "  <td height=23 colspan=4><div align=center class=Estilo1><b>TOTALES</b></div></td>";
    echo " </tr>";
    echo "<tr height=20>";
    echo " <td width=49>&nbsp;</td>";
    echo " <td width=413>&nbsp;</td>";
    echo " <td width=167><div align=right><b>SUBTOTAL</b></div></td>";
    echo " <td width=151><input name=txtmontosincargo type=text id=txtmontosincargo value=" . $ldec_totalsincargo . " style='text-align:right' class='letras-negrita' size='22' maxlength='20' readonly></td>";
    echo "</tr>";
    echo "<tr height=20>";
    echo " <td width=49>&nbsp;</td>";
    echo " <td width=413>&nbsp;</td>";
    echo " <td width=167><div align=right><input name='btnotroscreditos' type='button' class='boton' id='btnotroscreditos' value='Otros Cr&eacute;ditos' onClick='javascript:uf_agregar_dtcargos(\"\",\"\",\"\",\"\",\"\");'></div></td>";
    echo " <td width=151><input name=txtmontocargo type=text id=txtmontocargo value=" . number_format($ldec_totalcargo, 2, ",", ".") . " style='text-align:right' class='letras-negrita' size='22' maxlength='20' readonly></td>";
    echo "</tr>";
    echo "<tr height=20>";
    echo " <td width=49>&nbsp;</td>";
    echo " <td width=413>&nbsp;</td>";
    echo " <td width=147><div align=right><b>MONTO TOTAL</b></div></td>";
    echo " <td width=171><input name=txtmonto type=text class=texto-rojo id=txtmonto value=" . $ldec_total . " style='text-align:right' size='22' maxlength='20'  readonly></td>";
    echo "</tr>";
    echo "</table>";
}
      <td height="22"><input name="txtmonsol" type="text" id="txtmonsol" value="<?php echo $ld_monsol ?>" size="20" readonly style="text-align:right"/></td>
      <td height="22" colspan="2" style="text-align:left">Fecha Programaci&oacute;n   <input name="txtfecliq" type="text" id="txtfecliq" style="text-align:center" value="<?php echo $ls_fecliq ?>" size="15" maxlength="10" readonly /></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td height="22" colspan="4"><div align="right"><a href="javascript:uf_catalogo_solicitudes('<?php print $ls_rutfil ?>');"><img src="../shared/imagebank/tools20/buscar.gif" alt="Cargar Solicitudes de Pago..." width="20" height="20" border="0" longdesc="Carga los documentos xml dispuestos a generar las Programaciones de Pago..." />Cargar Solicitudes</a></div></td>
    </tr>
    <tr>
      <td colspan="4"><div align="center">
        <input name="hidfilsel" type="hidden" id="hidfilsel" value="<?php echo $li_filsel ?>" />
        <?php $io_grid->make_gridScroll($li_totrows,$la_rowgri,$la_object,750,'Detalles Solicitud de Desembolso',"grid_solicitudes",100); ?>
        <input name="hidtotrow" type="hidden" id="hidtotrow" value="<?php echo $li_totrows ?>" />
      </div></td>
    </tr>
  </table>
</form>
<p>&nbsp;</p>
</body>
<script>
f = document.form1;
function uf_catalogo_solicitudes(as_rutfil){
	li_leer = f.leer.value;
	if (li_leer==1)
	   {
		 window.open("sigesp_scb_cat_solicitudes_desembolso.php?rutfil="+as_rutfil,"catalogo","menubar=no,toolbar=no,scrollbars=yes,width=680,height=400,left=50,top=50,location=no,resizable=no");
	   }
<form id="sigesp_scb_cat_solicitudes_desembolso.php" name="form1" method="post" action="">
  <table width="364" border="0" align="center" cellpadding="0" cellspacing="0" class="formato-blanco">
    <tr class="sin-borde">
      <td height="11" colspan="6">&nbsp;</td>
    </tr>
    <tr>
      <td width="43">&nbsp;</td>
      <td width="60">&nbsp;</td>
      <td width="64">&nbsp;</td>
      <td width="64">&nbsp;</td>
      <td width="64">&nbsp;</td>
      <td width="67">&nbsp;</td>
    </tr>
    <tr>
      <td height="22" colspan="6"><div align="center">
			<?php $io_grid->make_gridScroll($li_totrows,$la_rowgri,$la_object,648,'Solicitudes de Desembolso',"grid_desembolso",100); ?>
      </div></td>	
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
示例#10
0
}
	//////////////////////////////////////////////         SEGURIDAD               /////////////////////////////////////////////
?>
		
          <p>&nbsp;</p>
          <table width="680" border="0" align="center" cellpadding="0" cellspacing="0" class="formato-blanco">
              <tr class="titulo-ventana">
                <td width="678">Configuraci&oacute;n de Reporte Origen y Aplicacion de Fondos Forma (0719) </td>
              </tr>
              <tr class="formato-blanco">
                <td height="20" valign="bottom">  Cuenta
                  <input name="txtfind" type="text" id="txtfind">
                  <input type="button" name="Submit" value="Buscar" onClick="javascript:uf_find_valor('txtcuentascg','txtfind');"></td>
              </tr>
            <tr class="formato-blanco">
              <td height="20"><p align="center"><?php $io_grid->make_gridScroll($total,$title,$object,620,'Detalles Cuenta',$grid1,310);?>
                  <input name="total" type="hidden" id="total" value="<?php print $total?>">
                </p>
              </td>
            </tr>
          </table>
            <p align="center">&nbsp;          </p>
            <p align="center">
              <input name="operacion"  type="hidden" id="operacion" >
              <input name="lastrow"    type="hidden" id="lastrow"    value="<?php print $lastrow;?>" >
              <input name="filadelete" type="hidden" id="filadelete">
            </p>
		</form></td>
      </tr>
  </table>
</div>
    </tr>
    <tr>
      <td height="13">&nbsp;</td>
      <td height="13">&nbsp;</td>
      <td height="13">&nbsp;</td>
      <td height="13">&nbsp;</td>
    </tr>
    <tr>
      <td height="22">&nbsp;</td>
      <td height="22"><a href="javascript:uf_cargar();">Cargar Cheques </a></td>
      <td height="22">&nbsp;</td>
      <td height="22">&nbsp;</td>
    </tr>
    <tr>
      <td height="22" colspan="4"><div align="center">
        <?php $io_grid->make_gridScroll($li_total,$title,$object,700,'Cheques a Entregar',$grid2,180)?>
		<input name="totalrows"  type="hidden" id="totalrows"  size=5 value="<?php print $li_total?>">
        <input name="lastscg" type="hidden" id="lastscg" size=5 value="<?php print $lastscg;?>">
        <input name="delete_scg" type="hidden" id="delete_scg" size=5>
</div></td>
    </tr>
  </table>
  <p><input name="operacion" type="hidden" id="operacion">
</p>
  </form>
</body>
<script language="javascript">
var patron = new Array(2,2,4);
function ue_nuevo()
{
	f=document.form1;
      </label></td>
    </tr>
    <tr>
      <td height="22" style="text-align:right">Concepto</td>
      <td height="22" colspan="4"><label>
        <input name="txtconmov" type="text" id="txtconmov" style="text-align:left" value="<?php echo $ls_conmov ?>" size="85" maxlength="500" />
      </label></td>
    </tr>
    <tr>
      <td colspan="5">&nbsp;</td>
    </tr>
    <tr>
      <td height="22" colspan="5"><div align="right"><a href="javascript:uf_catalogo_liquidaciones('<?php print $ls_rutfil ?>');"><img src="../shared/imagebank/tools20/buscar.gif" alt="Cargar Créditos..." title="Cargar Créditos..." width="20" height="20" border="0" longdesc="Carga los documentos xml dispuestos a liquidar..." />Cargar Cr&eacute;ditos </a></div></td>
    </tr>
    <tr>
      <td colspan="5"><div align="center"><?php $io_grid->make_gridScroll($li_totrows,$la_rowgri,$la_object,750,'Detalle Presupuestario',"grid_dtspg",100); ?>
        <input name="hidtotrow" type="hidden" id="hidtotrow" value="<?php echo $li_totrows ?>" />
      </div></td>
    </tr>
    <tr>
      <td colspan="5">&nbsp;</td>
    </tr>
    <tr>
      <td colspan="5"><div align="center">
        <?php $io_grid->make_gridScroll($li_totrowscg,$la_titscg,$la_objscg,750,'Detalle Contable',"grid_dtscg",100); ?>
        <input name="hidtotrowscg" type="hidden" id="hidtotrowscg" value="<?php echo $li_totrowscg ?>" />
      </div></td>
    </tr>
  </table>
</form>
<p>&nbsp;</p>
<form id="sigesp_scb_cat_solicitudes_desembolso.php" name="form1" method="post" action="">
  <table width="364" border="0" align="center" cellpadding="0" cellspacing="0" class="formato-blanco">
    <tr class="sin-borde">
      <td height="11" colspan="6">&nbsp;</td>
    </tr>
    <tr>
      <td width="43">&nbsp;</td>
      <td width="60">&nbsp;</td>
      <td width="64">&nbsp;</td>
      <td width="64">&nbsp;</td>
      <td width="64">&nbsp;</td>
      <td width="67">&nbsp;</td>
    </tr>
    <tr>
      <td height="22" colspan="6"><div align="center">
			<?php $io_grid->make_gridScroll($li_totrows,$la_rowgri,$la_object,648,'Créditos por Liquidar',"grid_liquidacion",100); ?>
      </div></td>	
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    if ($lb_valido) {
        $title[1] = "<input name=chktodos type=checkbox id=chktodos value=1 style=height:15px;width:15px onClick=javascript:uf_select_all(); >";
        $title[2] = "<a href=javascript:ue_ordenar('cedper');><font color=#FFFFFF>Cédula/Código</font></a>";
        $title[3] = "<a href=javascript:ue_ordenar('apeper');><font color=#FFFFFF>Nombre del Personal</font></a>";
        $ls_grid = "grid_personal";
        while ($row = $io_sql->fetch_row($rs_data)) {
            $li_total++;
            $ls_cedper = trim($row["cedper"]);
            $ls_nomper = trim($row["nomper"]);
            $ls_apeper = trim($row["apeper"]);
            $ls_nombre = $ls_apeper . ', ' . $ls_nomper;
            $object[$li_total][1] = "<input type=checkbox  id=checkper" . $li_total . "   name=checkper" . $li_total . "   value=1 class=sin-borde   size=5  style=text-align:center>";
            $object[$li_total][2] = "<input type=text      id=txtcedulas" . $li_total . " name=txtcedulas" . $li_total . " value='" . $ls_cedper . "' class=sin-borde size=20 style=text-align:center readonly>";
            $object[$li_total][3] = "<input type=text      id=txtnombre" . $li_total . "  name=txtnombre" . $li_total . "  value='" . $ls_nombre . "' class=sin-borde size=80 style=text-align:left   readonly>";
        }
        $io_class_grid->make_gridScroll($li_total, $title, $object, 560, 'Personal Nómina', $ls_grid, 200);
    } else {
        $li_numrows = $io_sql->num_rows($rs_data);
        if ($li_numrows <= 0) {
            $io_msg->message("No se ha encontrado personal por transferir !!!");
        }
    }
}
?>
&nbsp;</p>
  </div>
<input name="hidtotrows" type="hidden" id="hidtotrows" value="<?php 
print $li_total;
?>
">  
</form>