File: /home/asjudine/www/credito_rotativo_formulario_modificar.php
<?php
require_once("Conectarse.php");
/*$lastbon = mysql_query('SELECT MAX(bono) FROM redimir_bonos');
list($ultimobono)=mysql_fetch_row($lastbon);*/
$resul = mysql_query('SELECT cedula,apellidos,nombres,grado,direccion,telefono,celular,ciudad,email,libranza_credito,cuenta,banco,entidad,escuela,numerosolicitud,fecha_solicitud,nombre_padre,nombre_madre,direccion_padres,ciudad_padres,telefono_padres,celular_padres,referencia_compa,celular_compa, fecha_anticipo, monto_solicitado,estado FROM credito_rotativo WHERE cedula = "'.$_GET["ced2"].'" and libranza_credito = "' . $_GET["cred"] . '" ');
if (!$resul) {
die('Invalid query: ' . mysql_error());
}
list($cedula,$apellidos,$nombres,$grado,$direccion,$telefono,$celular,$ciudad,$email,$libranza_credito,$cuenta,$banco,$entidad,$escuela,$numerosolicitud,$fecha_solicitud,$nompadre, $nommadre, $direcpadres, $ciudadpadres, $telpadres, $celpadres, $refcompa, $celcompa,$fecha_anticipo,$monto_solicitado,$estado) = mysql_fetch_row($resul);
$guardacedula = $cedula;
if ($estado == 0)
{
$esta = "HISTORICO";
}
else
{
$esta = "VIGENTE";
}
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=8; IE=9; IE=edge" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>INGRESAR SOLICITUD CARTERA</title>
<style type="text/css">
*{margin: 0;padding: 0;}
body{background-color:#EAEAEA;font-family:Geneva,Arial,Helvetica,sans-serif;}
header {background-color: #B7271F; text-align: center;}
.titulo{width: 100%;text-align: center;background-color: #dbd8c9;color: #b20606;padding: 6px 0;font-size: 18px;}
table{margin: 0 auto;border: 8px solid #bebebe; text-align: center;}
.divirmenu{text-align: center;}
.irmenu{width: 200px;background-color: #1c4fa0;color: #fff; padding: 4px;border-radius: 6px;}
.irmenu:hover{background-color: #67a0d9; color: #000;}
.direcciona{width: 200px;background-color: #D4090C;color: #fff; padding: 4px;border-radius: 3px;}
.direcciona:hover{background-color: #67a0d9; color: #000;}
.fecha{background-color: #d6e08b; padding: 2px;color: #000;font-size: 15px; text-align: center;}
td{padding: 1px; border: 1px solid #a0a0a0;}
.td{background-color: #e5e5e5; padding: 1px 30px;color: #00135F;font-size: 14px;font-weight: 600; text-align: center;}
.boton1{width:30%;background-color: #ffffff;color: #000;padding: 2px;border:2px solid #580000;border-radius:10px;}
.boton1:hover{background-color: #6f0000;color: #fff;cursor: pointer;}
input[type=text],select{border-radius: 5px; padding: 3px;background-color: #FFF;}
.tdtitulo{background-color: #e3dec0; color: #b20606; padding: 2px; text-align: center; font-size: 12px; font-weight: 900}
.tdfull{background-color: #fff; color: #000; padding: 1px; text-align: center; font-size: 12px;}
.botonnew{width: 90px; background-color: #e3dec0;color: #b20606;padding: 1px;border-radius:5px;}
.botonnew:hover{width: 90px; background-color: #cbbd6a;color: #000;padding: 1px;border-radius:5px;}
.tdizq{background-color: #e5e5e5; padding: 1px 10px;color: #00135F;font-size: 12px;font-weight: 600; text-align: left;}
.tdcen{background-color: #e5e5e5; padding: 1px 10px;color: #00135F;font-size: 12px;font-weight: 600; text-align: center;}
.tdder{background-color: #e5e5e5; padding: 1px 2px;color: #00135F;font-size: 12px;font-weight: 600; text-align: right;}
.tddered{background-color: #e5e5e5; padding: 1px 2px;color: #D40609;font-size: 12px;font-weight: 600; text-align: right;}
.tdbono{background-color: #FFFFCC; padding: 1px 2px;color: #00135F;font-size: 12px;font-weight: 600; text-align: right;}
/*Estilo Complementario*/
.tdi{background-color: #F9FBC8; padding: 1px 10px;color: #00135F;font-size: 12px;font-weight: 600; text-align: left;}
.tdc{background-color: #F9FBC8; padding: 1px 10px;color: #00135F;font-size: 12px;font-weight: 600; text-align: center;}
.tdd{background-color: #F9FBC8; padding: 1px 2px;color: #00135F;font-size: 12px;font-weight: 600; text-align: right;}
.hit{background-color: #47547C; color: #fff; padding: 2px; text-align: center; font-size: 12px; font-weight: 900;}
</style>
<script type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
function anade() {
/*recep = document.anadir['receptores[]'];
for (i = 0; checkbox = recep[i]; i++) {
if (checkbox.checked ) {
return true;
}
}*/
}
//-->
</script>
<script Language="JavaScript">
function validarEntero(valor){
//intento convertir a entero.
//si era un entero no le afecta,si no lo era lo intenta convertir
valor = parseInt(valor)
//Compruebo si es un valor numérico
if (isNaN(valor)) {
//entonces (no es numero) devuelvo el valor cadena vacia
return ""
}else{
//En caso contrario (Si era un número) devuelvo el valor
return valor
}
}
</script>
</head>
<body onLoad="proba()">
<form action="" method="post" onSubmit="return valida_envia()" enctype="multipart/form-data" name="form1" id="form1">
<header>
<img src="../ELEMENTS/bannerInterasjudinet.png" alt="" width=" 700" height="70">
</header>
<div align="center">
<div class="titulo">MODIFICAR CREDITO </div>
<br>
<table width="885" border="2" cellpadding="1" cellspacing="1">
<tr>
<td height="40" class="tdder">Fecha Registro:</td>
<td class="tdizq"><input name="fecha" type="text" id="fecha" value="<?php echo $fecha_solicitud ?>" size="10" maxlength="10" /></td>
<td class="tdder">Cedula No:</td>
<td class="tdizq"><input name="cedula" type="text" id="cedula" value="<?php echo $cedula ?>" size="20" maxlength="20" /></td>
<td class="tdder">Credito Numero:</td>
<td class="tdizq"><input name="credito_numero" type="text" class="rojo" id="credito_numero" value="<?php echo $numerosolicitud ?>" size="14" maxlength="20" readonly/></td>
</tr>
<tr>
<td class="tdder">Apellidos:</td>
<td class="tdizq" colspan="2"><input name="apellidos" type="text" id="apellidos" value="<?php echo $apellidos ?>" size="40" maxlength="40"/></td>
<td class="tdder">Nombres:</td>
<td class="tdizq" colspan="2"><input name="nombres" type="text" id="nombres" value="<?php echo $nombres ?>" size="40" maxlength="40"/></td>
</tr>
<tr>
<td class="tdder">Direccion:</td>
<td class="tdizq"><input name="direccion" type="text" id="direccion" value="<?php echo $direccion ?>" size="45" maxlength="45" /></td>
<td class="tdder">Grado:</td>
<td class="tdizq"><input name="grado" type="text" id="grado" value="<?php echo $grado ?>" size="12" maxlength="10"/></td>
<td class="tdder">Ciudad:</td>
<td class="tdizq"><input name="ciudad" type="text" id="ciudad" value="<?php echo $ciudad ?>" size="14" maxlength="20" /></td>
</tr>
<tr>
<td class="tdder">E-mail:</td>
<td class="tdizq" ><input name="email" type="text" id="email" value="<?php echo $email ?>" size="35" maxlength="35"/></td>
<td class="tdder">Telefono:</td>
<td class="tdizq"><input name="telefono" type="text" id="telefono" value="<?php echo $telefono ?>" size="10" maxlength="20" /></td>
<td class="tdder">Celular:</td>
<td class="tdizq"><input name="celular" type="text" id="celular" value="<?php echo $celular ?>" size="20" maxlength="20" /></td>
</tr>
<tr >
<td class="tdder">Cuenta No:</td>
<td class="tdizq"><input name="cuenta" type="text" id="cuenta" value="<?php echo $cuenta ?>" size="20" maxlength="20" /></td>
<td class="tdder">Banco:</td>
<td class="tdizq"><input name="banco" type="text" id="banco" value="<?php echo $banco ?>" size="15" maxlength="15" /></td>
<td class="tdder">Credito Libranza:</td>
<td class="tdizq"><input name="libranza_credito" type="text" id="libranza_credito" value="<?php echo $libranza_credito ?>" size="20" maxlength="20" /></td>
<!--<th width="103" bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Sucursal :</th>
<td bgcolor="#F7FFE1" scope="col"><div align="left" class="Estilo70">
<input name="sucursal" type="text" id="sucursal" value="<?php echo $sucursal ?>" size="20" maxlength="20" />
<select name="sucursal1">
<option value="">--SELECCIONE SUCURSAL--</option>
<?php
do {
?>
<option value="<?php echo $row_sql5['nombre'];?>"><?php echo $row_sql5['nombre']?></option>
<?php
} while ($row_sql5 = mysql_fetch_assoc($sql5));
$rows5 = mysql_num_rows($sql5);
if($rows5 > 0) {
mysql_data_seek($sql5,0);
$row_sql5 = mysql_fetch_assoc($sql5);
}
?>
</select>
</div></td>-->
</tr>
<tr>
<!--<td class="tdder">Numero libranza:</td>
<td bgcolor="#F7FFE1" ><div align="left" class="Estilo70">
<input name="numlib" type="text" id="numlib" value="<?php echo $numlib ?>" size="12" maxlength="12" />
</div></td>-->
<td class="tdder">Monto Solicitado:</td>
<td class="tdizq"><input name="monto" type="text" id="monto" value="<?php echo $monto_solicitado ?>" size="12" maxlength="10" readonly /></td>
<td class="tdder">Escuela:</td>
<td class="tdizq"><input name="escuela" type="text" id="escuela" value="<?php echo $escuela ?>" size="20" maxlength="20" /></td>
<td class="tdder">Entidad:</td>
<td class="tdizq"><input name="entidad" type="text" id="entidad" value="<?php echo $entidad ?>" size="20" maxlength="20" /></td>
</tr>
<!--
<tr>
<td colspan="2" class="tdd">Cantidad de Bonos A Agregar</td>
<td colspan="2" class="tdc">
<select name="seleccionnumerobonos" onChange="MM_jumpMenu('parent',this,0)">
<OPTION value="">--NUMERO DE BONOS--</OPTION>
<option value="credito_rotativo_formulario_modificar.php?ced2=<?php echo $cedula ?>&numlib=<?php echo $numlib ?>&cred=<?php echo $libranza_credito ?>&numcon=<?php echo $numcon ?>&n=1">1</option>
<option value="credito_rotativo_formulario_modificar.php?ced2=<?php echo $cedula ?>&numlib=<?php echo $numlib ?>&cred=<?php echo $libranza_credito ?>&numcon=<?php echo $numcon ?>&n=2">2</option>
<option value="credito_rotativo_formulario_modificar.php?ced2=<?php echo $cedula ?>&numlib=<?php echo $numlib ?>&cred=<?php echo $libranza_credito ?>&numcon=<?php echo $numcon ?>&n=3">3</option>
<option value="credito_rotativo_formulario_modificar.php?ced2=<?php echo $cedula ?>&numlib=<?php echo $numlib ?>&cred=<?php echo $libranza_credito ?>&numcon=<?php echo $numcon ?>&n=4">4</option>
<option value="credito_rotativo_formulario_modificar.php?ced2=<?php echo $cedula ?>&numlib=<?php echo $numlib ?>&cred=<?php echo $libranza_credito ?>&numcon=<?php echo $numcon ?>&n=5">5</option>
</select>
</td>
<td class="tdc" colspan="2"></td>
</tr>
<tr>
<td class="tddered">Nº Bono1</td>
<td class="tdizq"><input name="bono1" type="text" id="bono1" value="<?php echo $bono1 ?>" size="12" maxlength="12" readonly/></td>
<td class="tddered">Nº Bono2</td>
<td class="tdizq"><input name="bono2" type="text" id="bono2" value="<?php echo $bono2 ?>" size="12" maxlength="12" readonly/></td>
<td class="tddered">Nº Bono3</td>
<td class="tdizq"><input name="bono3" type="text" id="bono3" value="<?php echo $bono3 ?>" size="12" maxlength="12" readonly/></td>
</tr>
<tr>
<td class="tddered">Nº Bono4</td>
<td class="tdizq"><input name="bono4" type="text" id="bono4" value="<?php echo $bono4 ?>" size="12" maxlength="12" readonly/></td>
<td class="tddered">Nº Bono5</td>
<td class="tdizq"><input name="bono5" type="text" id="bono5" value="<?php echo $bono5 ?>" size="12" maxlength="12" readonly/></td>
<td class="tddered">Nº Bono6</td>
<td class="tdizq"><input name="bono6" type="text" id="bono6" value="<?php echo $bono6 ?>" size="12" maxlength="12" /></td>
</tr>
<tr>
<td class="tddered">Nº Bono7</td>
<td class="tdizq"><input name="bono7" type="text" id="bono7" value="<?php echo $bono7 ?>" size="12" maxlength="12" readonly/></td>
<td class="tddered">Nº Bono8</td>
<td class="tdizq"><input name="bono8" type="text" id="bono8" value="<?php echo $bono8 ?>" size="12" maxlength="12" readonly/></td>
<td class="tddered">Nº Bono9</td>
<td class="tdizq"><input name="bono9" type="text" id="bono9" value="<?php echo $bono9 ?>" size="12" maxlength="12" readonly/></td>
</tr>
<tr>
<td class="tddered">Nº Bono10</td>
<td class="tdizq"><input name="bono10" type="text" id="bono10" value="<?php echo $bono10 ?>" size="12" maxlength="12" readonly/></td>
<td class="tddered">Nº Bono11</td>
<td class="tdizq"><input name="bono11" type="text" id="bono11" value="<?php echo $bono11 ?>" size="12" maxlength="12" readonly/></td>
<td class="tddered">Nº Bono12</td>
<td class="tdizq"><input name="bono12" type="text" id="bono12" value="<?php echo $bono12 ?>" size="12" maxlength="12" readonly/></td>
</tr>
<tr>
<td class="tddered">Nº Bono13</td>
<td class="tdizq"><input name="bono13" type="text" id="bono13" value="<?php echo $bono13 ?>" size="12" maxlength="12" readonly/></td>
<td class="tddered">Nº Bono14</td>
<td class="tdizq"><input name="bono14" type="text" id="bono14" value="<?php echo $bono14 ?>" size="12" maxlength="12" readonly/></td>
<td class="tddered">Nº Bono15</td>
<td class="tdizq"><input name="bono15" type="text" id="bono15" value="<?php echo $bono15 ?>" size="12" maxlength="12" readonly/></td>
</tr>
<tr>
<td class="tddered">Nº Bono16</td>
<td class="tdizq"><input name="bono16" type="text" id="bono16" value="<?php echo $bono16 ?>" size="12" maxlength="12" readonly/></td>
<td class="tddered">Nº Bono17</td>
<td class="tdizq"><input name="bono17" type="text" id="bono17" value="<?php echo $bono17 ?>" size="12" maxlength="12" readonly/></td>
<td class="tddered">Nº Bono18</td>
<td class="tdizq"><input name="bono18" type="text" id="bono18" value="<?php echo $bono18 ?>" size="12" maxlength="12" readonly/></td>
</tr>
<tr>
<td class="tddered">Nº Bono19</td>
<td class="tdizq"><input name="bono19" type="text" id="bono19" value="<?php echo $bono19 ?>" size="12" maxlength="12" readonly/></td>
<td class="tddered">Nº Bono20</td>
<td class="tdizq"><input name="bono20" type="text" id="bono20" value="<?php echo $bono20 ?>" size="12" maxlength="12" readonly/></td>
</tr>
-->
<tr>
<td class="tdder">Nombre Padre</td>
<td class="tdizq" colspan="2"><input name="nom_padre" type="text" id="nom_padre" value="<?php echo $nompadre ?>" size="40" maxlength="40" ></td>
<td class="tdder">Nombre Madre:</td>
<td class="tdizq" colspan="2"><input name="nom_madre" type="text" id="nom_madre" value="<?php echo $nommadre ?>" size="40" maxlength="40" /></td>
</tr>
<tr>
<td class="tdder">Direccion de Padres</td>
<td class="tdizq" colspan="2"><input name="dir_padres" type="text" id="dir_padres" value="<?php echo $direcpadres ?>" size="40" maxlength="40" /></td>
<td class="tdder">Ciudad Padres:</td>
<td class="tdizq" colspan="2"><input name="ciudad_padres" type="text" id="ciudad_padres" value="<?php echo $ciudadpadres ?>" size="40" maxlength="40" /></td>
</tr>
<tr>
<td class="tdder">Telefono Padres</td>
<td class="tdizq" colspan="2"><input name="tel_padres" type="text" id="tel_padres" value="<?php echo $telpadres ?>" size="40" maxlength="40" /></td>
<td class="tdder">Celular Padres:</td>
<td class="tdizq" colspan="2"><input name="cel_padres" type="text" id="cel_padres" value="<?php echo $celpadres ?>" size="40" maxlength="40" /></td>
</tr>
<tr>
<td class="tdder" >Referencia <br> COMPAÑERO</td>
<td class="tdizq" colspan="2"><input name="ref_compa" type="text" id="ref_compa" value="<?php echo $refcompa ?>" size="40" maxlength="40" /></td>
<td class="tdder">Nº Celular Compañero:</td>
<td class="tdizq" colspan="2"><input name="cel_compa" type="text" id="cel_compa" value="<?php echo $celcompa ?>" size="40" maxlength="40" /></td>
</tr>
</table>
<p>
<input name="menu2" type="button" class="irmenu" id="menu2" onClick="window.location.href='credito_rotativo_modificar_datos_inicial.php'" value="REGRESAR">
<?php
/*$ced2 = $_GET["ced2"];
$numlib = $_GET["numlib"];
echo "<input type='button' value='CONSULTAR CONTRATO' name=boton class=irmenu onClick =window.open('credito_consulta_credi.php?ced2=$cedula&numlib=$numlib','','top=50,left=70,toolbar=no,scrollbars=yes,width=910,height=530,status=yes')></a>";*/ ?>
<input name="guardar" type="submit" class="direcciona" id="guardar" value="MODIFICAR" />
</p>
</div>
</form>
</body>
</html>
<?php
if(isset($_POST["guardar"]))
{
$dis = date("d");
$mes = date("m");
$anos = date("Y");
$re = mysql_query("UPDATE credito_rotativo SET cedula = '".$_POST["cedula"]."', apellidos = '".$_POST["apellidos"]."', nombres = '".$_POST["nombres"]."', grado = '".$_POST["grado"]."', direccion = '".$_POST["direccion"]."', telefono = '".$_POST["telefono"]."', celular = '".$_POST["celular"]."', ciudad = '".$_POST["ciudad"]."', email = '".$_POST["email"]."', cuenta = '".$_POST["cuenta"]."', banco = '".$_POST["banco"]."', entidad = '".$_POST["entidad"]."', escuela = '".$_POST["escuela"]."', libranza_credito = '".$_POST["libranza_credito"]."', nombre_padre = '".$_POST["nom_padre"]."', nombre_madre = '".$_POST["nom_madre"]."', direccion_padres = '".$_POST["dir_padres"]."', ciudad_padres = '".$_POST["ciudad_padres"]."', telefono_padres = '".$_POST["tel_padres"]."', celular_padres = '".$_POST["cel_padres"]."', referencia_compa = '".$_POST["ref_compa"]."', celular_compa = '".$_POST["ref_compa"]."' WHERE cedula = '" . $_GET["ced2"] . "' ");
if (!$re) {
die('error update credito_rotativo : ' . mysql_error());
}
$updatecred = mysql_query('UPDATE credito_rotativo_solicitud SET cedula = "'.$_POST["cedula"].'", apellidos = "'.$_POST["apellidos"].'", nombres = "'.$_POST["nombres"].'", grado = "'.$_POST["grado"].'", cuenta = "'.$_POST["cuenta"].'", banco = "'.$_POST["banco"].'", libranza_credito="'.$_POST["libranza_credito"].'" WHERE cedula = "'.$guardacedula.'" ');
if (!$updatecred) {
die('error update credito_rotativo_solicitud : ' . mysql_error());
}
echo "<script>alert('La informacion fue modificada correctamente');</script>";
echo "<SCRIPT LANGUAGE='javascript'>window.location.href='credito_rotativo_modificar_datos_inicial.php'</SCRIPT>";
}
$sql = mysql_query('SELECT * FROM entidad_laboral order by nombre ');
if (!$sql) {
die('Invalid query: ' . mysql_error());
}
$row_sql = mysql_fetch_assoc($sql);
$totalRows_sql = mysql_num_rows($sql);
$sql2 = mysql_query('SELECT * FROM proveedores order by nombre ');
if (!$sql2) {
die('Invalid query: ' . mysql_error());
}
$row_sql2 = mysql_fetch_assoc($sql2);
$totalRows_sql2 = mysql_num_rows($sql2);
$sql5 = mysql_query('SELECT * FROM sucursal order by nombre ');
if (!$sql5) {
die('Invalid query: ' . mysql_error());
}
$row_sql5 = mysql_fetch_assoc($sql5);
$totalRows_sql5 = mysql_num_rows($sql5);
?>
<?
/*
echo'<table width="800" border="1" cellspacing="2" cellpadding="2" align = "center">
<tr align="center">
<td colspan="7"><font face="Georgia,Times New Roman,Times,serif" color="#000066"><b align = "center">PAGOS EFECTUADOS</b></font></td>
</tr>
<tr align="center" bgcolor="#FFFFCC">
<td width="260" align="center"><font face="Geneva,Arial,Helvetica,san-serif" size="2" color="#000066">Valor cuota</font></td>
<td bgcolor="#FFFFCC" width="55" ><font face="Geneva,Arial,Helvetica,san-serif" size="2" color="#000066"># cuotas</font></td>
<td width="100"><font face="Geneva,Arial,Helvetica,san-serif" size="2" color="#000066" align="center">Mes</font></td>
<td width="100"><font face="Geneva,Arial,Helvetica,san-serif" size="2" color="#000066" align="center">Año</font></td>
<td width="260"><font face="Geneva,Arial,Helvetica,san-serif" size="2" color="#000066">Fecha pago</font></td>
<td width="400" ><font face="Geneva,Arial,Helvetica,san-serif" size="2" color="#000066">Entidad</font></td>
<td width="260"><font face="Geneva,Arial,Helvetica,san-serif" size="2" color="#000066">Fecha registro</font></td>
</tr>';
$control = mysql_query('SELECT id,cedula,nombre,numero_libranza,credito_libranza,numero_cuota,mes_cuota,ano_cuota,valor_cuota,fecha_nomina,fecha_registro,codigo_descuento,unidad_descuento FROM credito_rotativo_estado_contable WHERE cedula = "' . $_GET["ced2"] . '" and credito_libranza = "' . $_GET["cred"] . '" ORDER BY numero_cuota ASC ');
if (!$control) {
die('Invalid query: ' . mysql_error());
}
while(list($id,$cedula,$nombre,$numlib,$libranza_credito,$cuota,$mescuota,$anocuota,$valorcuota,$fecha_nomina,$fecha_registro,$codesc,$unidesc) = mysql_fetch_row($control))
{
$control5 = mysql_query('SELECT * FROM descuentos WHERE codigo = "' ."$codesc". '" and unidad = "' ."$unidesc". '" ');
if (!$control5) {
die('Invalid query: ' . mysql_error());
}
list($idr,$codigo,$unidad,$concepto) = mysql_fetch_row($control5);
printf ("<tr align='center' bgcolor='#f4f4f4'>
<td width='100'><font face='Geneva,Arial,Helvetica,san-serif' size='2' color=#993300'><a window.location.href=\"cartera_modificar_estado.php?id=$id\">$valorcuota</a></td>
<td width='100'> <font face='Geneva,Arial,Helvetica,san-serif' size='2' color=#993300'><a window.location.href=\"cartera_modificar_estado.php?id=$id\" top=50,left=100,toolbar=no,scrollbars=no,width=790,height=521,status=yes>$cuota</a></td><td width='100'><font face='Geneva,Arial,Helvetica,san-serif' size='2' color=#993300'><a window.location.href=\"cartera_modificar_estado.php?id=$id\" top=50,left=100,toolbar=no,scrollbars=no,width=790,height=521,status=yes>$mescuota</a></td>
<td width='100'><font face='Geneva,Arial,Helvetica,san-serif' size='2' color=#993300'><a window.location.href=\"cartera_modificar_estado.php?id=$id\" top=50,left=100,toolbar=no,scrollbars=no,width=790,height=521,status=yes>$anocuota</a></td>
<td width='120'><font face='Geneva,Arial,Helvetica,san-serif' size='2' color=#993300'><a window.location.href=\"cartera_modificar_estado.php?id=$id\" top=50,left=120,toolbar=no,scrollbars=no,width=790,height=521,status=yes>$fecha_nomina</a></td>
<td width='750'><font face='Geneva,Arial,Helvetica,san-serif' size='2' color=#993300'><a window.location.href=\"cartera_modificar_estado.php?id=$id\" top=50,left=250,toolbar=no,scrollbars=no,width=790,height=521,status=yes>$concepto</a></td>
<td width='120'><font face='Geneva,Arial,Helvetica,san-serif' size='2' color=#993300'><a window.location.href=\"cartera_modificar_estado.php?id=$id\" top=50,left=100,toolbar=no,scrollbars=no,width=790,height=521,status=yes>$fecha_registro</a></td></tr>");
}
echo "</table>"; */
?>
<?php
$result = mysql_query('SELECT id, cedula, apellidos, nombres, libranza_credito, numerosolicitud, tipoo, solicitud1, fecha1, desembolso1, actuaciones, aprobado, fecha_aproba, fecha_denega FROM credito_rotativo_solicitud WHERE cedula = "'.$_GET["ced2"].'" ');
if (!$result) {
die('Error de consulta: ' . mysql_error());
}
if(mysql_num_rows($result) != 0)
{
echo "<center><table width=750 border=1 cellpadding=1 cellspacing=1>
<tr>
<td class='hit' colspan='6'>DESEMBOLSOS SOLICITUDES</td>
</tr>
<tr>
<td width='20' class='tdtitulo'>fecha Solicitud</td>
<td width='80' class='tdtitulo'>Solicitud Desembolso</td>
<td width='100' class='tdtitulo'>Fecha Aprobado</td>
<td width='75' class='tdtitulo'>Fecha Denegado</td>
<td width='75' class='tdtitulo'>Aprobado</td>
<td width='75' class='tdtitulo'>Tipo</td>
</tr></center>";
while(list($id_a,$cedula_a,$nombre_a,$numcon_a,$cred_a,$numerosolicitud_a,$tipoo_a,$solicitud_a,$fechasolicitud_a,$desembolso_a,$actuacion_a,$apro_a,$fecha_a, $fecha_d) = mysql_fetch_row($result))
{
echo "<tr class=lista>
<td class='tdfull'>$fechasolicitud_a</td>
<td class='tdfull'>$desembolso_a</td>
<td class='tdfull'>$fecha_a</td>
<td class='tdfull'>$fecha_d</td>
<td class='tdfull'>$apro_a</td>
<td class='tdfull'>$tipoo_a</td>
</tr>";
}
}
?>
<?php
/////////////////////////////////////////////////////////////////////
$consulta_ciclo = mysql_query('SELECT id, numerosolicitud, desembolso1, fecha_reporte, fecha_transaccion FROM credito_rotativo_solicitud WHERE cedula = "'.$_GET["ced2"].'" and ((estado = "5" || tipoo = "ANTICIPO") or fecha_transaccion ="") ');
echo "<center><table width=750 border=1 cellpadding=1 cellspacing=1>
<tr>
<td class='hitpay' colspan='5'>DESEMBOLSOS REALIZADOS</td>
</tr>
<tr>
<td class='tdtitulo'>PAGO</td>
<td class='tdtitulo'>FECHA DE TRANSACCION</td>
<td class='tdtitulo'>DIAS INTERES</td>
<td class='tdtitulo'>VALOR</td>
</tr></center>";
while(list($id_ciclo, $numero_solicitud_ciclo, $desembolso_ciclo, $fecha_reportar_ciclo, $fecha_transaccion_ciclo)=mysql_fetch_row($consulta_ciclo))
{
/*if($fecha_transaccion_ciclo =="" )
{
echo "<script>alert('EN TRAMITE DESEMBOLSO');</script>";
}*/
$fechat1 = strtotime($fecha_transaccion_ciclo);
$interes = 0.001;
$fechar = strtotime($fecha_reportar_ciclo);
$segundos_transcurridos1 = $fechar - $fechat1;
$dias_transcurridos1 = round($segundos_transcurridos1 / 86400);
$valor = ($desembolso_ciclo * $interes) * $dias_transcurridos1;
if($fecha_transaccion_ciclo =="")
{
$desembolso_ciclo = 0;
$dias_transcurridos1 = 0;
$valor = 0;
}
printf("<tr>
<td class='tdfull'>".$desembolso_ciclo."</td>
<td class='tdfull'>".$fecha_transaccion_ciclo."</td>
<td class='tdfull'>".$dias_transcurridos1."</td>
<td class='tdfull'>".$valor."</td>
");
$capital = $capital + $desembolso_ciclo;
$valor_final = $valor_final + $valor;
$total = $capital + $valor_final;
//FINAL
//$valortotal = $total + $valor_anticipo;
/*
<tr>
<td class='tdtitulo' colspan='3'>TOTAL + ANTICIPO</td>
<td class='tdfull' colspan='1'>$valortotal</td>
</tr>
*/
}
echo "<center><table width=750 border=1 cellpadding=1 cellspacing=1>
<tr class=lista>
<td class='tdtitulo'>CAPITAL</td>
<td class='tdfull'>$capital</td>
<td class='tdtitulo'>INTERES</td>
<td class='tdfull'>$valor_final</td>
</tr>
<tr>
<td class='tdtitulo' colspan='1'>TOTAL</td>
<td class='tdfull' colspan='3'>$total</td>
</tr>
";
?>