File: /home/asjudine/public_html/debito_modificar.php
<?php
require_once("mainfile.php");
include ("config.php");
global $dbi;
require_once("Conectarse.php");
///////////
$control4 = mysql_query('SELECT cedula, nombres, dirrecion, telefono, celular, ciudad, email, entidad_laboral, banco, cuenta, tipo_debito, valor_credito, valor_juridica, valor_debitar, unidad_desc, codigo_desc, cuotas, cuotas_desc, cuotas_pend, fecha_registro, causal_rechazo,fecha_debito,causal_terminacion,usuarios,situacion,estado FROM debitos WHERE cedula = "' . $_GET["ced"] . '" ');
if (!$control4) {
die('Invalid query 4 aqui: ' . mysql_error());
}
list($cedulab, $apellidos_nomsb, $direccionb, $telefonob, $celularb, $ciudadb, $emailb, $entilabo, $banco, $cuenta, $tipodebito, $val_cre, $val_jur, $val_deb, $unidad_desc,$codigo_desc, $cuo_deb, $cuodes, $cuotas_pend, $fecha_registro, $causal_rechazo,$fecha_debito,$causal_terminacion,$usuar,$situacion, $esta) = mysql_fetch_row($control4);
if ($esta == 0)
{
$estado = "HISTORICO";
}
else
{
$estado = "VIGENTE";
}
$resu1 = mysql_query('SELECT historico FROM debito_historico WHERE codigo = "' ."$causal_rechazo". '" ');
if (!$resu1) {
die('Invalid query: ' . mysql_error());
}
list($histo) = mysql_fetch_row($resu1);
$fecha_asignac = date("Y")."-".date("m")."-".date("d");
if(isset($_POST["grabar"]))
{
$fecha_asignac = date("Y")."-".date("m")."-".date("d");
//////
if ($_POST[causal_rechazo] == "")
{
$causarecha = $_POST["causal"];
}
else {
$causarecha = $_POST[causal_rechazo];
}
////////
if ($_POST[tipousu] == "")
{
$tipousu = $_POST["usuar"];
}
else {
$tipousu = $_POST[tipousu];
}
/////
if ($_POST[sit] == "")
{
$situan = $_POST["causal"];
}
else {
$situan = $_POST["sit"];
}
$fecha_act=date ( "Y-n-j" );
if ($_POST[unidt] == "")
{
$unidtas= $_POST["unidad"];
$codcdas = $_POST["codigo"];
}
else
{
$resu3 = mysql_query('SELECT unidad, codigo FROM debitos_unidad WHERE id = "' .$_POST[unidt]. '" ');
if (!$resu3) {
die('Invalid query 4455: ' . mysql_error());
}
list($unidtas, $codcdas ) = mysql_fetch_row($resu3);
}
if ($_POST["tipodeb"]== "")
{
$tipodebito = $_POST["tipodebito"];
}else
{
$tipodebito = $_POST["tipodeb"];
}
if ($_POST["emp2"] == "")
{
$entilabo = $_POST["entilabo"];
}else
{
$entilabo = $_POST["emp2"];
}
if ($_POST["tipsitua"] == "")
{
$tipsitua = $_POST["situacii"];
}else
{
$tipsitua = $_POST["tipsitua"];
}
$mssql3 = mysql_query("UPDATE debitos set dirrecion = '" . $_POST["dire"] . "', telefono = '" . $_POST["telefono"] . "', celular = '" . $_POST["celu"] . "', ciudad = '" . $_POST["ciu"] . "', email = '" . $_POST["ema"] . "', entidad_laboral = '" ."$entilabo". "', banco = '" . $_POST["ban"] . "', cuenta = '" . $_POST["cuen"] . "', tipo_debito = '" ."$tipodebito". "', valor_credito = '" . $_POST["val_cre"] . "', valor_juridica = '" . $_POST["val_jur"] . "' , valor_debitar = '" . $_POST["val_deb"] . "' , unidad_desc = '" ."$unidtas". "' , codigo_desc = '" ."$codcdas". "', cuotas = '" . $_POST["cuota_deb"] . "' , cuotas_desc = '" . $_POST["cuodes"] . "' ,cuotas_pend = '" . $_POST["cuopen"] . "' , causal_rechazo = '".$causarecha. "' , fecha_debito = '" . $_POST["fecha_deb"] . "', causal_terminacion = '" .$situan. "',fecha_terminacion = '" . $_POST["fecha_rechazo"] . "', usuarios = '" .$tipousu. "', situacion='".$tipsitua."' WHERE cedula = '" . $_GET[ced] . "' ");
if (!$mssql3) {
die('Invalid query cartera_serviasjudinet MODIFICAR: ' . mysql_error());
}
/////////////////////
$mssqldv = mysql_query("UPDATE cuentas_bancarias set cuenta= '".$_POST["cuen"]. "', banco= '".$_POST["ban"]."' WHERE cedula= '" . $_GET[ced] . "' ");
if (!$mssqldv) {
die('Invalid query: ' . mysql_error());
}
////////////////////////////////////////////////////
echo "<script>alert('Datos modificados Satisfatoriamente');</script>";
echo "<script languaje='javascript' type='text/javascript'>window.close();</script>";
$control4 = mysql_query('SELECT cedula, nombres, dirrecion, telefono, celular, ciudad, email, entidad_laboral, banco, cuenta, tipo_debito, valor_credito, valor_juridica, valor_debitar,unidad_desc, codigo_desc, cuotas, cuotas_desc, cuotas_pend, fecha_registro, causal_rechazo, fecha_debito,causal_terminacion, estado FROM debitos WHERE cedula = "' . $_GET["ced"] . '" ');
if (!$control4) {
die('Invalid query 4 aqui: ' . mysql_error());
}
list($cedulab, $apellidos_nomsb, $direccionb, $telefonob, $celularb, $ciudadb, $emailb, $entilabo, $banco, $cuenta, $tipodebito, $val_cre, $val_jur, $val_deb,$unidad_desc,$codigo_desc, $cuo_deb, $cuodes, $cuotas_pend, $fecha_registro, $causal_rechazo, $fecha_debito,$causal_terminacion, $esta) = mysql_fetch_row($control4);
}
$sql = mysql_query('SELECT * FROM entidad_laboral order by nombre ');
if (!$sql) {
die('Invalid query 87: ' . mysql_error());
}
$row_sql = mysql_fetch_assoc($sql);
$totalRows_sql = mysql_num_rows($sql);
$sql2 = mysql_query('SELECT * FROM debitos_unidad order by codigo ');
if (!$sql2) {
die('Invalid query 4141: ' . mysql_error());
}
$row_sql2 = mysql_fetch_assoc($sql2);
$totalRows_sql2 = mysql_num_rows($sql2);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Consulta Datos debito</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.Estilo1 {font-family: "Arial Narrow"}
.Estilo2 {
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
}
.Estilo10 {font-weight: bold}
.Estilo17 {font-size: 14}
.Estilo18 {font-family: "Arial Narrow"; font-weight: bold; font-size: 14; }
.Estilo19 {font-family: "Arial Narrow"; font-weight: bold; }
.Estilo24 {color: #FF0000}
-->
</style>
<script Language="JavaScript"><!--
function validar(formulario)
{
if (formulario.dia_act.value > 31)
{
alert("El número de día no se debe exceder de 31");
formulario.dia_act.focus();
return (false);
}
if (formulario.mes_act.value > 12)
{
alert("El número del mes no se debe exceder de 12");
formulario.mes_act.focus();
return (false);
}
return (true);
}
//--></script>
<script languaje="JavaScript">
function Mostrar_Fecha()
{
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var dayarray=new Array("Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sabado")
var montharray=new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre")
document.write("<b><font face='Arial, Helvetica, sans-serif'>"+dayarray[day]+" "+daym+" de "+montharray[month]+" de "+year+"</font></b>")
}
</script>
<script>
mesk=new Array();mesk[10]="A";mesk[11]="B";mesk[12]="C";mesk[13]="D";mesk[14]="E";mesk[15]="F";A=10;B=11;C=12;D=13;E=14;F=15;let="ABCDEF";function mes(num){if(let.indexOf(num) != -1){return eval(num)};else{if(num < 10){return eval(num)};else{return mesk[num]}}};
function color(begin,einde,stappen,stap){
hh1=(mes(begin.charAt(0))*16)+mes(begin.charAt(1));
hh2=(mes(begin.charAt(2))*16)+mes(begin.charAt(3));
hh3=(mes(begin.charAt(4))*16)+mes(begin.charAt(5));
pp1=(mes(einde.charAt(0))*16)+mes(einde.charAt(1));
pp2=(mes(einde.charAt(2))*16)+mes(einde.charAt(3));
pp3=(mes(einde.charAt(4))*16)+mes(einde.charAt(5));
if(hh1 < pp1){ff1=hh1+Math.floor((pp1-hh1)/stappen*stap);
ff1=eval("\'"+mes(Math.floor(ff1/16))+"\'")+eval("\'"+mes(ff1-(Math.floor(ff1/16)*16))+"\'");}
;else{ff1=hh1-Math.floor((hh1-pp1)/stappen*stap);
ff1=eval("\'"+mes(Math.floor(ff1/16))+"\'")+eval("\'"+mes(ff1-(Math.floor(ff1/16)*16))+"\'");}
if(hh2 < pp2){ff2=hh2+Math.floor((pp2-hh2)/stappen*stap);
ff2=eval("\'"+mes(Math.floor(ff2/16))+"\'")+eval("\'"+mes(ff2-(Math.floor(ff2/16)*16))+"\'");}
;else{ff2=hh2-Math.floor((hh2-pp2)/stappen*stap);
ff2=eval("\'"+mes(Math.floor(ff2/16))+"\'")+eval("\'"+mes(ff2-(Math.floor(ff2/16)*16))+"\'");}
if(hh3 < pp3){ff3=hh3+Math.floor((pp3-hh3)/stappen*stap);
ff3=eval("\'"+mes(Math.floor(ff3/16))+"\'")+eval("\'"+mes(ff3-(Math.floor(ff3/16)*16))+"\'");}
;else{ff3=hh3-Math.floor((hh3-pp3)/stappen*stap);
ff3=eval("\'"+mes(Math.floor(ff3/16))+"\'")+eval("\'"+mes(ff3-(Math.floor(ff3/16)*16))+"\'");}
;return ff1+ff2+ff3}
mesf=new Array();mesh=new Array();num2=0;num3=0;num4=0;txt="";function shape(){colorsh.innerHTML="<font color='#"+background_color+"'>"+mesf[num2]+"<\/font>";for(i=0;i != mesf[num2].length;i++){mesh[i]=background_color;};for(i=0;i != mesf[num2].length;i++){mesh[i+mesf[num2].length]=color(background_color,text_color,mesf[num2].length,i);};for(i=(mesf[num2].length*2);i != (mesf[num2].length*3);i++){mesh[i]=text_color};shape2()};function shape2(){for(i=0;i != mesf[num2].length;i++){txt=txt+"<font color='"+mesh[i+num3]+"'>"+mesf[num2].charAt(i)+"<\/font>";};colorsh.innerHTML=txt;txt="";if(num3 != (mesf[num2].length*2)){num3++;setTimeout("shape2()",50)};else{num2=0;num3=0;txt=background_color;background_color=text_color;text_color=txt;txt="";setTimeout("shape()",1000);}}
</script>
</head>
<body onload="document.formulario.cedula.focus()">
<form method="post" name="formulario" action="" onSubmit="return validar(this)">
<table width="420" border="1" align="center" cellpadding="3" cellspacing="3">
<tr >
<td colspan="6" align="right" nowrap bgcolor="#F9FFEA"><div align="center"><span class="Estilo2">MODIFICAR DATOS DEBITO </span></div></td>
</tr>
<tr valign="baseline" bgcolor="#0099FF">
<td colspan="6" align="right" nowrap bgcolor="#F9FFEA"><div align="center" class="Estilo2"><script languaje="JavaScript">Mostrar_Fecha()</script></div></td>
</tr>
<tr valign="baseline" bgcolor="#0099FF">
<td width="196" align="right" nowrap bgcolor="#F9FFEA"><span class="Estilo18">Cédula y Nombre</span></td>
<td bgcolor="#F9FFEA"><input name="identi" type="text" id="identi" value="<?php echo $cedulab; ?>" size="8" maxlength="8" readonly=""></td>
<td colspan="4" bgcolor="#F9FFEA"><input name="apenom" type="text" id="apenom" value="<?php echo $apellidos_nomsb; ?>" size="50" maxlength="50" readonly=""></td>
</tr>
<tr valign="baseline" bgcolor="#0099FF">
<td bgcolor="#F9FFEA"><div align="right" class="Estilo18">Direccion: </div></td>
<td width="40" bgcolor="#F9FFEA"><input name="dire" type="text" id="dire" value="<?php echo $direccionb; ?>" size="30" maxlength="40"readonly="" ></td>
<td width="150" bgcolor="#F9FFEA"><div align="right" class="Estilo18">Ciudad:</div></td>
<td width="10" bgcolor="#F9FFEA"><input name="ciu" type="text" id="ciu" value="<?php echo $ciudadb; ?>" size="30" maxlength="40" readonly="" ></td>
</tr>
<tr valign="baseline" bgcolor="#0099FF">
<td bgcolor="#F9FFEA"><div align="left" class="Estilo4 Estilo10 Estilo17 Estilo1">
<div align="right"><span class="Estilo5">Telefono:</span></div>
</div></td>
<td width="40" bgcolor="#F9FFEA"><input name="telefono" type="text" id="telefono" value="<?php echo $telefonob; ?>" size="8" maxlength="8" readonly=""></td>
<td align="right" nowrap bgcolor="#F9FFEA"><div align="left" class="Estilo4 Estilo10 Estilo17 Estilo1">
<div align="right"><span class="Estilo5">Celular </span></div>
</div></td>
<td bgcolor="#F9FFEA"><input name="celu" type="text" id="celu" value="<?php echo $celularb; ?>" size="10" maxlength="10" readonly=""></td>
</tr>
<tr valign="baseline" bgcolor="#0099FF">
<td align="right" nowrap bgcolor="#F9FFEA"><div align="left" class="Estilo4 Estilo10 Estilo17 Estilo1">
<div align="right"><span class="Estilo5">Fecha a Debitar </span></div>
</div></td>
<td bgcolor="#F9FFEA"><input name="fecha_deb" type="text" id="fecha_deb" value="<?php echo $fecha_debito; ?>" size="10" maxlength="10" ></td>
<td bgcolor="#F9FFEA"><div align="right" class="Estilo18">Email: </div></td>
<td colspan="3" bgcolor="#F9FFEA"><input name="ema" type="text" id="ema" value="<?php echo $emailb; ?>" size="30" maxlength="50" readonly="" ></td>
</tr>
<tr valign="baseline" bgcolor="#FFFFCC">
<td align="right" nowrap bgcolor="#F9FFEA"><span class="Estilo1 Estilo29"><strong>Banco:</strong></span></td>
<td align="right" nowrap bgcolor="#F9FFEA"><div align="left" class="Estilo19">
<input name="ban" type="text" id="ban" value="<?php echo $banco; ?>" size="20" maxlength="15" >
</div></td>
<td align="right" nowrap bgcolor="#F9FFEA" class="Estilo19">Cuenta:</td>
<td colspan="3" align="right" nowrap bgcolor="#F9FFEA"><div align="left"><span class="Estilo19">
<input name="cuen" type="text" id="cuen" value="<?php echo $cuenta; ?>" size="30" maxlength="30" >
</span></div></td>
</tr>
<tr valign="baseline" bgcolor="#FFFFCC">
<td align="right" nowrap bgcolor="#F9FFEA"><span class="Estilo1 Estilo29"><strong>Valor Credito:</strong></span></td>
<td align="right" nowrap bgcolor="#F9FFEA"><div align="left"><span class="Estilo19">
<input name="val_cre" type="text" id="val_cre" value="<?php echo $val_cre; ?>" size="10" maxlength="10">
</span></div></td>
<td align="right" nowrap bgcolor="#F9FFEA"><span class="Estilo1 Estilo29"><strong>Valor Juridica:</strong></span></td>
<td colspan="3" align="right" nowrap bgcolor="#F9FFEA"><div align="left"><span class="Estilo19">
<input name="val_jur" type="text" id="val_jur" value="<?php echo $val_jur; ?>" size="10" maxlength="10">
</span></div></td>
</tr>
<tr valign="baseline" bgcolor="#FFFFCC">
<td align="right" nowrap bgcolor="#F9FFEA"><span class="Estilo1 Estilo29"><strong>Valor Total Debito:</strong></span></td>
<td align="right" nowrap bgcolor="#F9FFEA"><div align="left"><span class="Estilo1">
<input name="val_deb" type="text" id="val_deb" value="<?php echo $val_deb; ?>" size="10" maxlength="10">
</span></div></td>
<td align="right" nowrap bgcolor="#F9FFEA"><span class="Estilo1 Estilo29"><strong>Cuotas a Debitar:</strong></span> </td>
<td align="right" nowrap bgcolor="#F9FFEA"><div align="left"><span class="Estilo19"><span class="Estilo17">
<input name="cuota_deb" type="text" id="cuota_deb" value="<?php echo $cuo_deb; ?>" size="10" maxlength="10">
</span></span></div></td>
</tr>
<tr>
<td align="right" nowrap bgcolor="#F9FFEA"><span class="Estilo1 Estilo29"><strong>Valor Cuota:</strong></span> </td>
<td align="right" nowrap bgcolor="#F9FFEA"><div align="left"><span class="Estilo19"><span class="Estilo17">
<input name="valcuota" type="text" id="valcuota" value="<?php echo $val_deb; ?>" size="10" maxlength="10">
</span></span></div></td>
<td bgcolor="#F9FFEA" class="Estilo51" ><div align="center" class="Estilo85">
<div align="right" class="Estilo18">Tipo: </div>
</div></td>
<td bgcolor="#F9FFEA">
<input name="tipodebito" type="text" id="tipodebito" value="<?php echo $tipodebito; ?>" size="20" maxlength="20">
<select name="tipodeb" class="Estilo15">
<option value="" selected>--TIPO DE DEBITO--</option>
<option value="CREDITO">CREDITO</option>
<option value="JURIDICA">JURIDICA</option>
<option value="MIXTO">MIXTO</option>
</select> </td>
</tr>
<tr valign="baseline" bgcolor="#FFFFCC">
<td align="right" nowrap bgcolor="#F9FFEA"><span class="Estilo1 Estilo29"><strong>Unidad y Codigo:</strong></span></td>
<td align="right" nowrap bgcolor="#F9FFEA"><div align="left"><span class="Estilo1">
<input name="unidad" type="text" id="unidad" value="<?php echo $unidad_desc; ?>" size="10" maxlength="10" readonly="">
<input name="codigo" type="text" id="cod" value="<?php echo $codigo_desc; ?>" size="10" maxlength="10" readonly=""> </span></div>
<select name="unidt" class="Estilo55" id="unidt">
<option value="">--SELECIONE UNIDAD Y CODIGO--</option>
<?php
do {
?>
<option value="<?php echo $row_sql2['id'];?>"><?php echo $row_sql2['unidad'].'-'.$row_sql2['codigo']?></option>
<?php
} while ($row_sql2 = mysql_fetch_assoc($sql2));
$rows2 = mysql_num_rows($sql2);
if($rows2 > 0) {
mysql_data_seek($sql2, 0);
$row_sql2 = mysql_fetch_assoc($sql2);
}
?>
</select></td>
<td align="right" nowrap bgcolor="#F9FFEA"><span class="Estilo1 Estilo29"><strong>Entidad Laboral:</strong></span></td>
<td bgcolor="#F9FFEA">
<input name="entilabo" type="text" id="entilabo" value="<?php echo $entilabo; ?>" size="30" maxlength="20">
<select name="emp2" id="emp2">
<option value="">--SELECCIONE LA EMPRESA--</option>
<?php
do {
?>
<option value="<?php echo $row_sql['nombre'];?>"><?php echo $row_sql['nombre']?></option>
<?php
} while ($row_sql = mysql_fetch_assoc($sql));
$rows = mysql_num_rows($sql);
if($rows > 0) {
mysql_data_seek($sql, 0);
$row_sql = mysql_fetch_assoc($sql);
}
?>
</select>
</td>
</tr>
<tr>
<td align="right" nowrap bgcolor="#F9FFEA"><span class="Estilo1 Estilo29"><strong>Cuotas Pendientes:</strong></span> </td>
<td align="right" nowrap bgcolor="#F9FFEA"><div align="left"><span class="Estilo19"><span class="Estilo17">
<input name="cuopen" type="text" id="cuopen" value="<?php echo $cuotas_pend; ?>" size="10" maxlength="10">
</span></span></div></td>
<td align="right" nowrap bgcolor="#F9FFEA"><span class="Estilo1 Estilo29"><strong>Cuotas Descontadas:</strong></span> </td>
<td colspan="3" align="right" nowrap bgcolor="#F9FFEA"><div align="left"><span class="Estilo19"><span class="Estilo17">
<input name="cuodes" type="text" id="cuodes" value="<?php echo $cuodes; ?>" size="10" maxlength="10">
</span></span></div></td>
</tr>
<tr valign="baseline" bgcolor="#FFFFCC">
<td align="right" nowrap bgcolor="#F9FFEA"><span class="Estilo1 Estilo29"><strong>Causal Terminación:</strong></span></td>
<td align="right" nowrap bgcolor="#F9FFEA"><div align="left"><span class="Estilo1">
<input name="causal" type="text" id="causal" value="<?php echo $causal_terminacion; ?>" size="40" maxlength="30">
<div align="left">
<select name="sit" id="sit">
<option value="" selected>--SELECCIONE CAUSAL--</option>
<option value="POR DEBITO CUMPLIDO">POR DEBITO CUMPLIDO</option>
<option value="POR FALLECIMIENTO">POR FALLECIMIENTO</option>
<option value="POR CUENTA SALDADA">POR CUENTA SALDADA</option>
<option value="POR MAS DE TRES DEBITOS SIN EXITO">POR MAS DE TRES DEBITOS SIN EXITO</option>
</select>
<td align="right" nowrap bgcolor="#F9FFEA"><span class="Estilo1 Estilo29"><strong>Fecha Terminación:</strong></span> </td>
<td colspan="3" align="right" nowrap bgcolor="#F9FFEA"><div align="left"><span class="Estilo19"><span class="Estilo17">
<input name="fecha_rechazo" type="text" id="fecha_rechazo" value="<?php echo $fecha_asignac; ?>" size="10" maxlength="10">
</span></span></div></td>
</tr>
<tr valign="baseline" bgcolor="#FFFFCC">
<td align="right" nowrap bgcolor="#F9FFEA"><span class="Estilo1 Estilo29"><strong>Vigente o historico:</strong></span></td>
<td align="right" nowrap bgcolor="#F9FFEA"><div align="left"><span class="Estilo1">
<input name="estad" type="text" id="estad" value="<?php echo $estado; ?>" size="20" maxlength="25">
</span></div></td>
<td align="right" nowrap bgcolor="#F9FFEA"><span class="Estilo1 Estilo29"><strong>Situacion:</strong></span></td>
<td bgcolor="#F9FFEA">
<input name="situacii" type="text" id="situacii" value="<?php echo $situacion; ?>" size="25" maxlength="20">
<select name="tipsitua" id="tipsitua">
<option value="" selected>--TIPO DE SITUACION--</option>
<option value="NORMAL">NORMAL</option>
<option value="ESPECIAL">ESPECIAL</option>
</select>
</td>
</tr>
<tr>
<td width="60" bgcolor="#F9FFEA" class="Estilo51"><div align="center" class="Estilo85">
<div align="right">Usuario: </div>
</div></td>
<td bgcolor="#F9FFEA">
<input name="usuar" type="text" id="usuar" value="<?php echo $usuar; ?>" size="25" maxlength="20">
<td colspan="3" bgcolor="#F9FFEA"><select name="tipousu" class="Estilo15">
<option value="" selected>--TIPO DE USUARIO--</option>
<option value="CREDITOS">CREDITOS</option>
<option value="COBRANZAS">COBRANZAS</option>
<option value="VENTAS">VENTAS</option>
<option value="GESTION EMPRESARIAL">GESTION EMPRESARIAL</option>
<option value="NOMINAS">NOMINAS</option>
<option value="ALMACEN MUEBLES">ALMACEN MUEBLES</option>
<option value="TESORERIA">TESORERIA</option>
<option value="DEBITOS BANCARIOS">DEBITOS BANCARIOS</option>
<option value="HERNANDO ROSERO">HERNANDO ROSERO</option>
</select> </td>
</tr>
</table>
<p align="center">
<input name="grabar" type="submit" class="Estilo24" id="grabar" value="Modificar" />
</p>
</form>
</body>
</html>
<?
echo'<table width="650" border="0" cellspacing="2" cellpadding="2" align = "center">
<tr align="center">
<td colspan="7"><font face="Georgia, Times New Roman, Times, serif" color="#006600"><b align = "center">PAGOS EFECTUADOS</b></font></td>
</tr>
<tr align="center" bgcolor="#DDDDDD">
<td width="90" align="center"><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#000099">Valor cuota</font></td>
<td bgcolor="#DDDDDD" width="55" ><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#000099"># cuotas</font></td>
<td bgcolor="#DDDDDD" width="55" ><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#000099">Causal</font></td>
<td bgcolor="#DDDDDD" width="55" ><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#000099">Usuario</font></td>
<td width="300" ><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#000099">Entidad</font></td>
<td width="140"><font face="Geneva, Arial, Helvetica, san-serif" size="2" color="#000099">Fecha registro</font></td>
</tr>';
$control = mysql_query('SELECT * FROM debitos_estado_contable WHERE cedula = "' .$_GET["ced"] . '" ORDER BY cuota ASC ');
if (!$control) {
die('Invalid query debitos: ' . mysql_error());
}
while(list($id, $cedula, $nombre, $cuota, $valorcuota,$usuarios, $fecha_registro, $codesc, $unidesc,$causal_rechazo) = mysql_fetch_row($control))
{
$control5 = mysql_query('SELECT * FROM debitos_unidad WHERE codigo = "' ."$codesc". '" and unidad = "' ."$unidesc". '" ');
if (!$control5) {
die('Invalid query descunetps: ' . 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>$causal_rechazo</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>$usuarios</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='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>$fecha_registro</a></td></tr>");
}
echo "</table>";
?>