File: /home/asjudine/www/creditos/editSeguimiento_solicitudcredito.php
<?
include("head.php");
include("datacon.php");
?>
<?
$cedula = $id;
$queryupdate = "select * from seguimiento_solicitudcredito where cedula = '$cedula'";
$resultupdate = MYSQL_QUERY($queryupdate);
$numberupdate = mysql_Numrows($resultupdate);
if ($numberupdate>0) {
$x=0;
?>
<script Language="JavaScript"><!--
function validar(formulario)
{
if (!(formulario.negado.value == "") && (formulario.aprobado.value == "SI"))
{
alert("Una Solicitud de Crédito NO puede aparecer como Aprobada y Negada al mismo tiempo.");
formulario.aprobado.focus();
return (false);
}
if ((formulario.aprobado.value == "SI") && !(formulario.devuelto.value == ""))
{
alert("Una Solicitud de Crédito NO puede aparecer Aprobada y Devuelta al mismo tiempo.");
formulario.devuelto.focus();
return (false);
}
if ((formulario.aprobado.value == "SI") && ((formulario.aprobado_cuantia.value == "") || (formulario.aprobado_meses.value == "") || (formulario.aprobado_valorcuota.value == "") || (formulario.aprobadofecha.value == "")) )
{
alert("Si fué aprobada la Solicitud de Crédito debe llenar los campos Fecha, Cuantía, Meses y Valor Cuota.");
formulario.aprobadofecha.focus();
return (false);
}
if (!(formulario.negado.value == "") && !(formulario.devuelto.value == ""))
{
alert("Una Solicitud de Crédito NO puede aparecer Negada y Devuelta al mismo tiempo.");
formulario.negado.focus();
return (false);
}
return (true);
}
function nocambiar()
{
alert("Se recomienda NO cambiar la Cédula. De lo contrario no se podrá actualizar el registro que está editando");
}
function activaraprobado()
{
if (document.updateFormMaker.aprobado.value == "NO") {
}
document.updateFormMaker.aprobadofecha.value = "";
document.updateFormMaker.aprobado_cuantia.value = "";
document.updateFormMaker.aprobado_meses.value = "";
document.updateFormMaker.aprobado_valorcuota.value = "";
}
//--></script>
<h4 align="center">Formulario de Edición </h4>
<form name=updateFormMaker method=post action="updateseguimiento_solicitudcredito.php" onSubmit="return validar(this)">
<table width="500" border=0 align="center" cellpadding=2 cellspacing=2 bgcolor="#EEEEEE">
<?
while ($x<$numberupdate)
{
?>
<? $cedula=mysql_result($resultupdate,$x,"cedula"); ?>
<? $presentacionsolicitud=mysql_result($resultupdate,$x,"presentacionsolicitud"); ?>
<? $enviadoparaestudio=mysql_result($resultupdate,$x,"enviadoparaestudio"); ?>
<? $resultadoevaluacion=mysql_result($resultupdate,$x,"resultadoevaluacion"); ?>
<? $aprobadofecha=mysql_result($resultupdate,$x,"aprobadofecha"); ?>
<? $aprobado=mysql_result($resultupdate,$x,"aprobado"); ?>
<? $aprobado_cuantia=mysql_result($resultupdate,$x,"aprobado_cuantia"); ?>
<? $aprobado_meses=mysql_result($resultupdate,$x,"aprobado_meses"); ?>
<? $aprobado_valorcuota=mysql_result($resultupdate,$x,"aprobado_valorcuota"); ?>
<? $presentaciondocumentos=mysql_result($resultupdate,$x,"presentaciondocumentos"); ?>
<? $enviodocumentosestudio=mysql_result($resultupdate,$x,"enviodocumentosestudio"); ?>
<? $recepciondocumentosoficinaprincipal=mysql_result($resultupdate,$x,"recepciondocumentosoficinaprincipal"); ?>
<? $resultadoestudiocredito=mysql_result($resultupdate,$x,"resultadoestudiocredito"); ?>
<? $negado=mysql_result($resultupdate,$x,"negado"); ?>
<? $modificado_cuantia=mysql_result($resultupdate,$x,"modificado_cuantia"); ?>
<? $modificado_meses=mysql_result($resultupdate,$x,"modificado_meses"); ?>
<? $modificado_valorcuota=mysql_result($resultupdate,$x,"modificado_valorcuota"); ?>
<? $devuelto=mysql_result($resultupdate,$x,"devuelto"); ?>
<? $devueltofecha=mysql_result($resultupdate,$x,"devueltofecha"); ?>
<? $devueltoobservaciones=mysql_result($resultupdate,$x,"devueltoobservaciones"); ?>
<? $desembolso_fecha=mysql_result($resultupdate,$x,"desembolso_fecha"); ?>
<? $desembolso_banco=mysql_result($resultupdate,$x,"desembolso_banco"); ?>
<? $desembolso_cuenta=mysql_result($resultupdate,$x,"desembolso_cuenta"); ?>
<table width="600" align="center" cellpadding="0" cellspacing="1" bgcolor="#EEEEEE">
<tr height=30 valign=top>
<td width="300" align=right><img src="trans.gif" width="300" height="10"></td>
<td> </td>
</tr>
<tr height=30 valign=top>
<td align=right valign="middle"><b>Cédula :</b></td>
<td valign="middle"><input name="cedula" type="text" id="cedula" value="<? echo $cedula; ?>" onFocus="nocambiar();" onChange="nocambiar();">
</td>
</tr>
<tr height=30 valign=top>
<td align=right valign="middle"><b>Presentación Solicitud de Crédito :</b></td>
<td valign="top"><table border="0" cellspacing="2" cellpadding="0">
<tr>
<td></td>
<td><strong>
<select name="presentacionsolicitud" id="presentacionsolicitud">
<option value="<? echo $presentacionsolicitud; ?>"><? echo $presentacionsolicitud; ?></option>
<option value="SI">SI</option>
<option value="NO">NO</option>
<option value=""></option>
</select>
</strong></td>
</tr>
</table> </td>
</tr>
<tr height=30 valign=top>
<td align=right valign="middle"><b>Enviado para Evaluación :</b></td>
<td valign="top"><table border="0" cellspacing="2" cellpadding="0">
<tr>
<td></td>
<td><strong>
<select name="enviadoparaestudio" id="enviadoparaestudio">
<option value="<? echo $enviadoparaestudio; ?>"><? echo $enviadoparaestudio; ?></option>
<option value="SI">SI</option>
<option value="NO">NO</option>
<option value=""></option>
</select>
</strong></td>
</tr>
</table> </td>
</tr>
<tr height=30 valign=top>
<td align=right valign="middle"><b>Resultado de la Evaluación :</b></td>
<td valign="top"><table border="0" cellspacing="2" cellpadding="0">
<tr>
<td></td>
<td><strong>
<select name="resultadoevaluacion" id="resultadoevaluacion">
<option value="<? echo $resultadoevaluacion; ?>"><? echo $resultadoevaluacion; ?></option>
<option value="SI">SI</option>
<option value="NO">NO</option>
<option value=""></option>
</select>
</strong></td>
</tr>
</table> </td>
</tr>
<tr height=30 valign=top>
<td align=right> </td>
<td> </td>
</tr>
<tr valign=middle height=30>
<td align=right><b>Solicitud Aprobada? :</b></td>
<td><strong>
</strong>
<table border="0" cellspacing="2" cellpadding="0">
<tr>
<td></td>
<td><strong>
<select name="aprobado" id="aprobado" onChange="activaraprobado();">
<option value="<? echo $aprobado; ?>"><? echo $aprobado; ?></option>
<option value="SI">SI</option>
<option value="NO">NO</option>
<option value=""></option>
</select>
</strong></td>
</tr>
</table>
</td>
</tr>
<tr valign=top height=30>
<td align=right><b>Fecha :</b></td>
<td><strong>
<input name="aprobadofecha" type="text" id="aprobadofecha" value="<? echo $aprobadofecha; ?>">
</strong></td>
</tr>
<tr height=30 valign=middle>
<td align=right><b>Cuantía :</b></td>
<td><input name="aprobado_cuantia" type="text" id="aprobado_cuantia" value="<? echo $aprobado_cuantia; ?>">
</td>
</tr>
<tr height=30 valign=middle>
<td align=right><b>Meses :</b></td>
<td><input name="aprobado_meses" type="text" id="aprobado_meses" value="<? echo $aprobado_meses; ?>">
</td>
</tr>
<tr height=30 valign=middle>
<td align=right><b>Cuota :</b></td>
<td><input name="aprobado_valorcuota" type="text" id="aprobado_valorcuota" value="<? echo $aprobado_valorcuota; ?>">
</td>
</tr>
<tr height=30 valign=top>
<td align=right> </td>
<td> </td>
</tr>
<tr height=30 valign=top>
<td align=right><b>Presentación de Documentos :</b></td>
<td><strong>
<select name="presentaciondocumentos" id="presentaciondocumentos">
<option value="<? echo $presentaciondocumentos; ?>"><? echo $presentaciondocumentos; ?></option>
<option value="SI">SI</option>
<option value="NO">NO</option>
<option value=""></option>
</select>
</strong></td>
</tr>
<tr height=30 valign=top>
<td align=right><b>Envío Documentos para Estudio :</b></td>
<td><strong>
<select name="enviodocumentosestudio" id="enviodocumentosestudio">
<option value="<? echo $enviodocumentosestudio; ?>"><? echo $enviodocumentosestudio; ?></option>
<option value="SI">SI</option>
<option value="NO">NO</option>
<option value=""></option>
</select>
</strong></td>
</tr>
<tr height=30 valign=top>
<td align=right><b>Recepción Documentos Oficina Principal :</b></td>
<td><strong>
<select name="recepciondocumentosoficinaprincipal" id="recepciondocumentosoficinaprincipal">
<option value="<? echo $recepciondocumentosoficinaprincipal; ?>"><? echo $recepciondocumentosoficinaprincipal; ?></option>
<option value="SI">SI</option>
<option value="NO">NO</option>
<option value=""></option>
</select>
</strong></td>
</tr>
<tr height=30 valign=top>
<td align=right><b>Resultado del Estudio de Crédito :</b></td>
<td><strong>
<select name="resultadoestudiocredito" id="resultadoestudiocredito">
<option value="<? echo $resultadoestudiocredito; ?>"><? echo $resultadoestudiocredito; ?></option>
<option value="SI">SI</option>
<option value="NO">NO</option>
<option value=""></option>
</select>
</strong></td>
</tr>
<tr height=30 valign=top>
<td align=right> </td>
<td> </td>
</tr>
<tr height=30 valign=top>
<td align=right><b>Negado :</b></td>
<td><select name="negado" id="negado">
<option value="<? echo $negado; ?>"><? echo $negado; ?></option>
<option value="Falta Requisitos">Falta Requisitos</option>
<option value="Falta Documentos">Falta Documentos</option>
<option value="Capacidad de Pago">Capacidad de Pago</option>
<option value=""></option>
</select>
</td>
</tr>
<tr height=30 valign=top>
<td align=right> </td>
<td> </td>
</tr>
<tr height=30 valign=top>
<td align=right><b> Cuantía :</b></td>
<td><input name="modificado_cuantia" type="text" id="modificado_cuantia" value="<? echo $modificado_cuantia; ?>">
</td>
</tr>
<tr height=30 valign=top>
<td align=right><b>Meses :</b></td>
<td><input name="modificado_meses" type="text" id="modificado_meses" value="<? echo $modificado_meses; ?>">
</td>
</tr>
<tr height=30 valign=top>
<td align=right><b>Valor cuota :</b></td>
<td><input name="modificado_valorcuota" type="text" id="modificado_valorcuota" value="<? echo $modificado_valorcuota; ?>">
</td>
</tr>
<tr height=30 valign=top>
<td align=right> </td>
<td> </td>
</tr>
<tr height=30 valign=top>
<td align=right><b>Devuelto :</b></td>
<td><select name="devuelto" id="devuelto">
<option value="<? echo $devuelto; ?>"><? echo $devuelto; ?></option>
<option value="Para Cambio Codeudor">Para Cambio Codeudor</option>
<option value="Para Cambio Documentos">Para Cambio Documentos</option>
<option value="Falta de Firmas">Falta de Firmas</option>
<option value=""></option>
</select>
</td>
</tr>
<tr valign=top height=30>
<td align=right><b>Fecha :</b></td>
<td><strong>
<input name="devueltofecha" type="text" id="devueltofecha" value="<? echo $devueltofecha; ?>">
</strong></td>
</tr>
<tr height=30 valign=top>
<td align=right><b>Observaciones :</b></td>
<td><textarea name="devueltoobservaciones" cols="35" rows="3" id="devueltoobservaciones"><? echo $devueltoobservaciones; ?>
</textarea></td>
</tr>
<tr height=30 valign=top>
<td align=right> </td>
<td> </td>
</tr>
<tr height=30 valign=top>
<td align=right> </td>
<td><b>Desembolso</b></td>
</tr>
<tr height=30 valign=top>
<td align=right><b>Fecha :</b></td>
<td><input name="desembolso_fecha" type="text" id="desembolso_fecha" value="<? echo $desembolso_fecha; ?>">
</td>
</tr>
<tr height=30 valign=top>
<td align=right><b>Banco :</b></td>
<td><input name="desembolso_banco" type="text" id="desembolso_banco" value="<? echo $desembolso_banco; ?>"></td>
</tr>
<tr height=30 valign=top>
<td align=right><b>Cuenta :</b></td>
<td><input name="desembolso_cuenta" type="text" id="desembolso_cuenta" value="<? echo $desembolso_cuenta; ?>">
</td>
</tr>
<tr height=30 valign=top>
<td align=right> </td>
<td> </td>
</tr>
<tr height=30 valign=top>
<td align=right><input type=submit name=Submit value="Actualizar"></td>
<td> </td>
</tr>
<?
$x++;
} // end while
} // end if
?>
</table>
</form>
<?
include("foot.php");
?>