File: /home/asjudine/public_html/acreditos/modificar_devolucion_cre.php
<?php
require_once("../Conectarse.php");
if(isset($_POST["consultar"]))
{
$resul = mysql_query('SELECT numero_carpeta, cedula, nombre_completo, numero, tipo, capital_periodo, capital_renovacion, interes_prejuridico, interes_cobroejecutivo, capital_clausula, deuda_total, oficio_numero, fecha_oficio, cedula_funcionario, unidad FROM cabranzas_credito WHERE cedula = "' . $_POST[ced] . '" ');
if (!$resul) {
die('Invalid query: ' . mysql_error());
}
if ((mysql_num_rows($resul)!=0))
{
list($numero_carpeta, $cedula, $nombre_completo, $numero, $tipo, $capital_periodo, $capital_renovacion, $interes_prejuridico, $interes_cobroejecutivo, $capital_clausula, $deuda_total, $oficio_numero, $fecha, $cedfun, $unidad) = mysql_fetch_row($resul);
}
$resu = mysql_query('SELECT cuenta_cobro, numero_carpeta, cedula, motivo, capital_recuperado, oficio_dev_num, fecha, unidad FROM devolucion_carpeta WHERE cedula = "' . $_POST[ced] . '"');
$num2=mysql_num_rows($resu);
if (!$resu) {
die('Invalid query: ' . mysql_error());
}
list($cue_cob, $nc, $cc, $mot_devo, $cap_rec, $no_ofdev, $fecha_d, $uni) = mysql_fetch_row($resu);
}
if(isset($_POST["guardar"]))
{
if($motivo!='1')
{
$motivo_devo=$motivo;
}
else
{
$motivo_devo=$motivo_devo;
}
$mssql = mysql_query(" UPDATE devolucion_carpeta set cuenta_cobro = '" . $_POST[cuenta_cob] . "' , numero_carpeta = '" . $_POST[numero_carp] . "' , motivo ='" . $_POST[motivo_devo] . "' , capital_recuperado = '" . $_POST[capital_rec] . "' , oficio_dev_num = '" . $_POST[oficio_dn] . "', fecha = '" . $_POST[fecha_devo] . "' , unidad = '" . $_POST[unidad_dev] . "' WHERE cedula = '" . $cedula. "' ");
if (! $mssql) {
die('Invalid query: ' . mysql_error());
}
if($motivo=='Por cambio a la CDDC')
{
$sql2 = mysql_query('UPDATE cabranzas_credito set estado = "1", unidad = "CDDC" WHERE cedula = "' . $_POST[cedula] . '" ');
}else{
$sql = mysql_query('UPDATE cabranzas_credito set estado = "0" WHERE cedula = "' . $_POST[cedula] . '" ');
}
echo "<script>alert('La Devolucion fue modificada correctamente');</script>";
$resut = mysql_query('SELECT cuenta_cobro, numero_carpeta, cedula, motivo, capital_recuperado, oficio_dev_num, fecha, unidad FROM devolucion_carpeta WHERE cedula = "' . $_POST[cedula] . '"');
$num3=mysql_num_rows($resut);
if (!$resut) {
die('Invalid query: ' . mysql_error());
}
list($cue_cob, $nc, $cc, $mot_devo, $cap_rec, $no_ofdev, $fecha_d, $uni) = mysql_fetch_row($resut);
}
?>
<!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>Modificar devolucion Cre</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]{border-radius: 5px; padding: 3px;background-color: #FFFEF4;}
.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;}
.tdbonizq{background-color: #FFFFCC; padding: 1px 10px;color: #00135F;font-size: 12px;font-weight: 600; text-align: left;}
/*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;}
</style>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<header>
<img src="../ELEMENTS/bannerInterasjudinet.png" alt="" width=" 700" height="70">
</header>
<div align="center">
<table width="330" border="3" cellpadding="3" cellspacing="3">
<caption>
<span class="titulo">DEVOLUCIONES </span>
</caption>
<tr>
<th colspan="2" scope="col"><label>Digite el Numero de Cedula </label></th>
</tr>
<tr>
<td width="162"><div align="center"><span class="Estilo34">CEDULA : </span></div></td>
<td width="135"><div align="center">
<input name="ced" type="text" id="ced" size="20" maxlength="20" />
</div></td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input name="consultar" type="submit" class="direcciona" id="consultar" value="Consultar" />
</div></td>
</tr>
</table>
<p> </p>
</div>
<table width="639" border="0" align="center" cellpadding="3" cellspacing="3">
<tr valign="baseline" bgcolor="#0099FF">
<td colspan="4" class="titulo">INFORMACION COBRANZAS</td>
</tr>
<tr valign="baseline" bgcolor="#0099FF">
<td colspan="4" align="right" nowrap="nowrap"><div align="center" class="Estilo2">
<script languaje="JavaScript">Mostrar_Fecha()</script>
</div></td>
</tr>
<tr valign="baseline" bgcolor="#0099FF">
<td width="180" align="right" nowrap="nowrap"><span class="Estilo29">Cédula, apellidos y nombres</span></td>
<td><input name="cedula" type="text" id="cedula" value="<?php echo $cedula; ?>" size="15" maxlength="15" readonly="" /></td>
<td colspan="2"><input name="nombre_completo" type="text" id="nombre_completo3" value="<?php echo $nombre_completo; ?>" size="50" maxlength="50" readonly="" /></td>
</tr>
<tr valign="baseline" bgcolor="#0099FF">
<td align="right" nowrap="nowrap"><span class="Estilo30"><span class="Estilo29">Número de carpeta:</span></span></td>
<td><input name="numero_carpeta2" type="text" id="numero_carpeta2" value="<?php echo $numero_carpeta; ?>" size="4" maxlength="4" readonly="" /></td>
<td><div align="right" class="Estilo29">Unidad:</div></td>
<td><input name="unidad" type="text" id="unidad" value="<?php echo $unidad; ?>" size="4" maxlength="4" readonly="" /></td>
</tr>
<tr valign="baseline" bgcolor="#0099FF">
<td><div align="right"><span class="Estilo29">Número de Contrato:</span></div></td>
<td width="69"><input name="numero" type="text" id="numero" value="<?php echo $numero; ?>" size="6" maxlength="6" readonly="" /></td>
<td width="196"><div align="right"><span class="Estilo29">Tipo:</span></div></td>
<td><input name="tipo" type="text" id="tipo" value="<?php echo $tipo; ?>" size="4" maxlength="4" readonly="" /></td>
</tr>
<tr valign="baseline" bgcolor="#0099FF">
<td align="right" nowrap="nowrap"><span class="Estilo29">Capital Período actual:</span></td>
<td><input name="capital_periodo" type="text" id="capital_periodo" value="<?php echo $capital_periodo; ?>" size="10" maxlength="10" readonly="" /></td>
<td><div align="right"><span class="Estilo29">Capital renovación Automática:</span></div></td>
<td width="155"><input name="capital_renovacion" type="text" id="capital_renovacion" value="<?php echo $capital_renovacion; ?>" size="10" maxlength="10" readonly="" /></td>
</tr>
<tr valign="baseline" bgcolor="#0099FF">
<td align="right" nowrap="nowrap"><span class="Estilo29">Intereses Cobro Prejurídico:</span></td>
<td><input name="interes_prejuridico" type="text" id="interes_prejuridico" value="<?php echo $interes_prejuridico; ?>" size="10" maxlength="10" readonly="" /></td>
<td><div align="right"><span class="Estilo29">Interés Cobro Ejecutivo:</span></div></td>
<td><input name="interes_cobroejecutivo" type="text" id="interes_cobroejecutivo" value="<?php echo $interes_cobroejecutivo; ?>" size="10" maxlength="10" readonly="" /></td>
</tr>
<tr valign="baseline" bgcolor="#0099FF">
<td align="right" nowrap="nowrap"><span class="Estilo29">Capital cláusula penal:</span></td>
<td><input name="capital_clausula" type="text" id="interes_prejuridico3" value="<?php echo $capital_clausula; ?>" size="10" maxlength="10" readonly="" /></td>
<td><div align="right"><span class="Estilo29">Deuda Total:</span></div></td>
<td><input name="deuda_total" type="text" id="deuda_total3" value="<?php echo $deuda_total; ?>" size="10" maxlength="10" readonly="" /></td>
</tr>
<tr valign="baseline" bgcolor="#0099FF">
<td align="right" nowrap="nowrap"><span class="Estilo29">Oficio de envó No.:</span></td>
<td bgcolor="#0099FF"><input name="oficio_numero" type="text" id="oficio_numero" value="<?php echo $oficio_numero; ?>" size="4" maxlength="4" readonly="" /></td>
<td><div align="right"><span class="Estilo29">Fecha <span class="Estilo33">:</span></span></div></td>
<td><span class="Estilo29">
<input name="fecha_oficio" type="text" id="fecha_oficio" value="<?php echo $fecha; ?>" size="10" maxlength="10" readonly="" />
</span></span></td>
</tr>
</table>
<p> </p>
<table width="651" border="0" align="center" cellpadding="3" cellspacing="3">
<tr valign="baseline" bgcolor="#0099FF">
<td colspan="4" class="titulo">MODIFICAR DEVOLUCIONES</td>
</tr>
<tr valign="baseline" bgcolor="#0099FF">
<td align="right" nowrap="nowrap"><span class="Estilo29">Número Carpeta:</span></td>
<td align="right" nowrap="nowrap"><div align="left">
<input name="numero_carp" type="text" id="numero_carp" value="<?php echo $nc; ?>" size="4" maxlength="4" />
</div></td>
<td align="right" nowrap="nowrap"><span class="Estilo29">Cuenta de cobro No.:</span></td>
<td align="right" nowrap="nowrap"><div align="left">
<input name="cuenta_cob" type="text" id="cuenta_cob" value="<?php echo $cue_cob; ?>" size="4" maxlength="4" />
</div></td>
</tr>
<tr valign="baseline" bgcolor="#0099FF">
<td align="right" nowrap="nowrap"><span class="Estilo29">Unidad:</span></td>
<td width="53" align="right" nowrap="nowrap"><div align="left">
<input name="unidad_dev" type="text" id="unidad_dev" value="<?php echo $uni; ?>" size="4" maxlength="4" />
</div></td>
<td width="188" align="right" nowrap="nowrap"><span class="Estilo29">Capital recuperado:</span></td>
<td width="149" align="right" nowrap="nowrap"><div align="left">
<input name="capital_rec" type="text" id="capital_rec" value="<?php echo $cap_rec; ?>" size="10" maxlength="10" />
</div></td>
</tr>
<tr valign="baseline" bgcolor="#0099FF">
<td align="right" nowrap="nowrap"><span class="Estilo29">Número de oficio devolución:</span></td>
<td align="right" nowrap="nowrap"><div align="left">
<input name="oficio_dn" type="text" id="oficio_dn" value="<?php echo $no_ofdev; ?>" size="4" maxlength="4" />
</div></td>
<td align="right" nowrap="nowrap"><span class="Estilo29">Fecha devolución:</span></td>
<td align="right" nowrap="nowrap"><div align="left"><span class="Estilo29">
<input name="fecha_devo" type="text" id="fecha_devo" value="<?php echo $fecha_d; ?>" size="10" maxlength="10" />
</span></div></td>
</tr>
<tr valign="baseline" bgcolor="#0099FF">
<td width="222" align="right" nowrap="nowrap"><span class="Estilo29">Motivo de la devolución:</span></td>
<td colspan="3" align="right" nowrap="nowrap"><div align="left">
<p>
<input name="motivo_devo" type="text" id="nombre_completo" value="<?php echo $mot_devo; ?>" size="50" maxlength="50" />
</p>
<p>
<select name="motivo">
<option value="1" selected="selected">SELECCIONE EL MOTIVO</option>
<option value="Por condonación deuda">Por condonación deuda</option>
<option value="Por paz y salvo">Por paz y salvo</option>
<option value="Por no dar lugar al cobro ejecutivo">Por no dar lugar al cobro ejecutivo</option>
<option value="Por no legalización">Por no legalización</option>
<option value="Por pago total de la obligación">Por pago total de la obligación</option>
<option value="Por solicitud de Serviasjudinet">Por solicitud de Serviasjudinet</option>
<option value="Por cambio a la CDDC">Por cambio a la CDDC</option>
<option value="Por fallecimiento">Por fallecimiento</option>
</select>
</p>
</div></td>
</tr>
<tr valign="baseline" bgcolor="#0099FF">
<td colspan="4" align="right" nowrap="nowrap"><div align="center">
<input name="guardar" type="submit" id="guardar" value ="Guardar" class="direcciona" />
</div></td>
</tr>
</table>
<p align="center">
<input name="menu2" type="button" class="irmenu" id="menu2" onclick="window.location.href='menu_cobranzas_cre.php'" value="IR AL MENU" />
</p>
</form>
</body>
</html>