File: /home/asjudine/public_html/pages/credito_rotativo_solicitud_pago.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, rango, direccion, telefono, celular, ciudad, email, libranza_credito, cuenta, banco, numerosolicitud, fecha_solicitud, escuela,entidad, nombre_padre, nombre_madre, direccion_padres, ciudad_padres,telefono_padres,celular_padres,referencia_compa,celular_compa, valor_anticipo, saldo_pendiente, monto_solicitado, estado FROM credito_rotativo WHERE cedula = "'.$_GET["ced2"].'" ');
if (!$resul) {
die('Invalid query: ' . mysql_error());
}
list($cedula, $apellidos, $nombres, $grado, $rango, $direccion, $telefono,$celular,$ciudad,$email,$cred,$cuenta,$banco,$numero_solicitud, $fecha_solicitud,$escuela,$entidad, $nombre_padre,$nombre_madre,$dir_padres,$ciudad_padres,$tel_padres,$cel_padres,$referencia_compa,$cel_compa, $valor_anticipo, $saldo_pendiente, $monto_solicitado, $estado) = mysql_fetch_row($resul);
$fullnombre = $apellidos ." ". $nombres;
if ($estado == 0)
{
$esta = "HISTORICO";
}
else
{
$esta = "VIGENTE";
}
//NUEVO
/*$redi = mysql_query('SELECT monto_solicitado, entidad, bono1,bono2,bono3,bono4,bono5,bono6,bono7,bono8,bono9,bono10,bono11,bono12,bono13,bono14,bono15,bono16,bono17,bono18,bono19,bono20 FROM redimir_bonos WHERE cedula = "'.$_GET["ced2"].'" and libranza_credito = "' . $_GET["cred"] . '" ' );
if (!$redi) {
die('Invalid query 1: ' . mysql_error());
}
list($monto_solicitado,$entidad,$bono1,$bono2,$bono3,$bono4,$bono5,$bono6,$bono7,$bono8,$bono9,$bono10,$bono11,$bono12,$bono13,$bono14,$bono15,$bono16,$bono17,$bono18,$bono19,$bono20 ) = mysql_fetch_row($redi);*/
/*
if($grado == "SLP")
{
$montosolicitado = "500000";
?>
<script languaje="javascript">
function proba(){
var bono6 = document.getElementById("bono6").disabled = true;
var bono7 = document.getElementById("bono7").disabled = true;
var bono8 = document.getElementById("bono8").disabled = true;
var bono9 = document.getElementById("bono9").disabled = true;
var bono10 = document.getElementById("bono10").disabled = true;
var bono11 = document.getElementById("bono11").disabled = true;
var bono12 = document.getElementById("bono12").disabled = true;
var bono13 = document.getElementById("bono13").disabled = true;
var bono14 = document.getElementById("bono14").disabled = true;
var bono15 = document.getElementById("bono15").disabled = true;
var bono16 = document.getElementById("bono16").disabled = true;
var bono17 = document.getElementById("bono17").disabled = true;
var bono18 = document.getElementById("bono18").disabled = true;
var bono19 = document.getElementById("bono19").disabled = true;
var bono20 = document.getElementById("bono20").disabled = true;
}
</script><?php
}
elseif($grado == "AL" || $grado == "PT")
{
$montosolicitado = "1000000";
?>
<script languaje="javascript">
function proba(){
var bono11 = document.getElementById("bono11").disabled = true;
var bono12 = document.getElementById("bono12").disabled = true;
var bono13 = document.getElementById("bono13").disabled = true;
var bono14 = document.getElementById("bono14").disabled = true;
var bono15 = document.getElementById("bono15").disabled = true;
var bono16 = document.getElementById("bono16").disabled = true;
var bono17 = document.getElementById("bono17").disabled = true;
var bono18 = document.getElementById("bono18").disabled = true;
var bono19 = document.getElementById("bono19").disabled = true;
var bono20 = document.getElementById("bono20").disabled = true;
}
</script><?php
}
elseif($grado == "C3" || $grado == "SC" || $grado == "CS" || $grado == "CP" || $grado == "SS" || $grado == "SV" || $grado == "SB" || $grado == "SP" || $grado == "SM" || $grado == "IJ")
{
$montosolicitado = "1500000";
?>
<script languaje="javascript">
function proba(){
var bono16 = document.getElementById("bono16").disabled = true;
var bono17 = document.getElementById("bono17").disabled = true;
var bono18 = document.getElementById("bono18").disabled = true;
var bono19 = document.getElementById("bono19").disabled = true;
var bono20 = document.getElementById("bono20").disabled = true;
}
</script><?php
}
elseif($grado == "ST" || $grado == "TE" || $grado == "CP")
{
$montosolicitado = "2000000";
?>
<script languaje="javascript">
function proba(){
}
</script><?php
}
*/
/*
$tere = 0;
$con1 = mysql_query('SELECT cedula FROM cartera_serviasjudinet WHERE cedula = "' . "$cedula". '" and estado = "1" ');
if (!$con1) {
die('Invalid query: ' . mysql_error());
}
while(list($cedut) = mysql_fetch_row($con1))
{
$tere = $tere + 1 ;
}
*/
//NUMERO CONSECUTIVO
$maximo = mysql_query('SELECT MAX(numerosolicitud) FROM credito_rotativo_solicitud ');
list($contador_solicitud)=mysql_fetch_row($maximo);
if($contador_solicitud==0){$contador_solicitud=1;}
else{$contador_solicitud++;}
?>
<!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;}
.tdrojad{background-color: #EEE; color: #8A0002; padding: 1px 4px;font-size: 12px;font-weight: 600; text-align: right;}
.tdrojai{background-color: #EEE; color: #8A0002; padding: 1px 4px;font-size: 12px;font-weight: 600; text-align: left;}
.hit{background-color: #47547C; color: #fff; padding: 2px; text-align: center; font-size: 12px; font-weight: 900;}
.hitpay{background-color: #125417; color: #fff; padding: 2px; text-align: center; font-size: 12px; font-weight: 900;}
</style>
<script>
function Verificar(){
/*if (document.form1.seleccioncantidad.value==""){
alert("SELECCIONE CANTIDAD")
document.form1.seleccioncantidad.focus()
return (false);
}*/
/*if(document.form1.saldo_pendiente.value>0){
alert("SELECCIONE UNA CANTIDAD MEJOR")
document.form1.saldo_pendiente.focus()
return (false);
}*/
if(document.form1.valor_solicitud.value==""){
alert("SELECCIONE DESEMBOLSO")
document.form1.valor_solicitud.focus()
return (false);
}
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>
<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>
</head>
<body onLoad="proba()">
<form action="" method="post" onSubmit="return Verificar()" 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">SOLICITUD DE PAGO</div>
<br>
<?php
/*
//////////////////////////////////////////////////////////
echo "<h4>El Ultimo Bono Registrado es ".$ultimobono."</h4>";
//////////////////////////////////////////////////////////
$contador = $_GET["n"];
if($_GET["n"]==1)
{
if($bono2==""){$bono2 = $ultimobono+1;}
elseif($bono3==""){$bono3 = $ultimobono+1;}
elseif($bono4==""){$bono4 = $ultimobono+1;}
elseif($bono5==""){$bono5 = $ultimobono+1;}
elseif($bono6==""){$bono6 = $ultimobono+1;}
elseif($bono7==""){$bono7 = $ultimobono+1;}
elseif($bono8==""){$bono8 = $ultimobono+1;}
elseif($bono9==""){$bono9 = $ultimobono+1;}
elseif($bono10==""){$bono10 = $ultimobono+1;}
elseif($bono11==""){$bono11 = $ultimobono+1;}
elseif($bono12==""){$bono12 = $ultimobono+1;}
elseif($bono13==""){$bono13 = $ultimobono+1;}
elseif($bono14==""){$bono14 = $ultimobono+1;}
elseif($bono15==""){$bono15 = $ultimobono+1;}
elseif($bono16==""){$bono16 = $ultimobono+1;}
elseif($bono17==""){$bono17 = $ultimobono+1;}
elseif($bono18==""){$bono18 = $ultimobono+1;}
elseif($bono19==""){$bono19 = $ultimobono+1;}
elseif($bono20==""){$bono20 = $ultimobono+1;}
$monto_solicitado = $monto_solicitado + ($contador*100000);
}
if($_GET["n"]==2)
{
if($bono2==""){$bono2 = $ultimobono+1;$bono3 = $ultimobono+2;}
elseif($bono3==""){$bono3 = $ultimobono+1;$bono4 = $ultimobono+2;}
elseif($bono4==""){$bono4 = $ultimobono+1;$bono5 = $ultimobono+2;}
elseif($bono5==""){$bono5 = $ultimobono+1;$bono6 = $ultimobono+2;}
elseif($bono6==""){$bono6 = $ultimobono+1;$bono7 = $ultimobono+2;}
elseif($bono7==""){$bono7 = $ultimobono+1;$bono8 = $ultimobono+2;}
elseif($bono8==""){$bono8 = $ultimobono+1;$bono9 = $ultimobono+2;}
elseif($bono9==""){$bono9 = $ultimobono+1;$bono10 = $ultimobono+2;}
elseif($bono10==""){$bono10 = $ultimobono+1;$bono11 = $ultimobono+2;}
elseif($bono11==""){$bono11 = $ultimobono+1;$bono12 = $ultimobono+2;}
elseif($bono12==""){$bono12 = $ultimobono+1;$bono13 = $ultimobono+2;}
elseif($bono13==""){$bono13 = $ultimobono+1;$bono14 = $ultimobono+2;}
elseif($bono14==""){$bono14 = $ultimobono+1;$bono15 = $ultimobono+2;}
elseif($bono15==""){$bono15 = $ultimobono+1;$bono16 = $ultimobono+2;}
elseif($bono16==""){$bono16 = $ultimobono+1;$bono17 = $ultimobono+2;}
elseif($bono17==""){$bono17 = $ultimobono+1;$bono18 = $ultimobono+2;}
elseif($bono18==""){$bono18 = $ultimobono+1;$bono19 = $ultimobono+2;}
elseif($bono19==""){$bono19 = $ultimobono+1;$bono20 = $ultimobono+2;}
$monto_solicitado = $monto_solicitado + ($contador*100000);
}
if($_GET["n"]==3)
{
if($bono2==""){$bono2 = $ultimobono+1;$bono3 = $ultimobono+2;$bono4 = $ultimobono+3;}
elseif($bono3==""){$bono3 = $ultimobono+1;$bono4 = $ultimobono+2;$bono5 = $ultimobono+3;}
elseif($bono4==""){$bono4 = $ultimobono+1;$bono5 = $ultimobono+2;$bono6 = $ultimobono+3;}
elseif($bono5==""){$bono5 = $ultimobono+1;$bono6 = $ultimobono+2;$bono7 = $ultimobono+3;}
elseif($bono6==""){$bono6 = $ultimobono+1;$bono7 = $ultimobono+2;$bono8 = $ultimobono+3;}
elseif($bono7==""){$bono7 = $ultimobono+1;$bono8 = $ultimobono+2;$bono9 = $ultimobono+3;}
elseif($bono8==""){$bono8 = $ultimobono+1;$bono9 = $ultimobono+2;$bono10 = $ultimobono+3;}
elseif($bono9==""){$bono9 = $ultimobono+1;$bono10 = $ultimobono+2;$bono11 = $ultimobono+3;}
elseif($bono10==""){$bono10 = $ultimobono+1;$bono11 = $ultimobono+2;$bono12 = $ultimobono+3;}
elseif($bono11==""){$bono11 = $ultimobono+1;$bono12 = $ultimobono+2;$bono13 = $ultimobono+3;}
elseif($bono12==""){$bono12 = $ultimobono+1;$bono13 = $ultimobono+2;$bono14 = $ultimobono+3;}
elseif($bono13==""){$bono13 = $ultimobono+1;$bono14 = $ultimobono+2;$bono15 = $ultimobono+3;}
elseif($bono14==""){$bono14 = $ultimobono+1;$bono15 = $ultimobono+2;$bono16 = $ultimobono+3;}
elseif($bono15==""){$bono15 = $ultimobono+1;$bono16 = $ultimobono+2;$bono17 = $ultimobono+3;}
elseif($bono16==""){$bono16 = $ultimobono+1;$bono17 = $ultimobono+2;$bono18 = $ultimobono+3;}
elseif($bono17==""){$bono17 = $ultimobono+1;$bono18 = $ultimobono+2;$bono19 = $ultimobono+3;}
elseif($bono18==""){$bono18 = $ultimobono+1;$bono19 = $ultimobono+2;$bono20 = $ultimobono+3;}
$monto_solicitado = $monto_solicitado + ($contador*100000);
}
if($_GET["n"]==4)
{
if($bono2==""){$bono2 = $ultimobono+1;$bono3 = $ultimobono+2;$bono4 = $ultimobono+3;$bono5 = $ultimobono+4;}
elseif($bono3==""){$bono3 = $ultimobono+1;$bono4 = $ultimobono+2;$bono5 = $ultimobono+3;$bono6 = $ultimobono+4;}
elseif($bono4==""){$bono4 = $ultimobono+1;$bono5 = $ultimobono+2;$bono6 = $ultimobono+3;$bono7 = $ultimobono+4;}
elseif($bono5==""){$bono5 = $ultimobono+1;$bono6 = $ultimobono+2;$bono7 = $ultimobono+3;$bono8 = $ultimobono+4;}
elseif($bono6==""){$bono6 = $ultimobono+1;$bono7 = $ultimobono+2;$bono8 = $ultimobono+3;$bono9 = $ultimobono+4;}
elseif($bono7==""){$bono7 = $ultimobono+1;$bono8 = $ultimobono+2;$bono9 = $ultimobono+3;$bono10 = $ultimobono+4;}
elseif($bono8==""){$bono8 = $ultimobono+1;$bono9 = $ultimobono+2;$bono10 = $ultimobono+3;$bono11 = $ultimobono+4;}
elseif($bono9==""){$bono9 = $ultimobono+1;$bono10 = $ultimobono+2;$bono11 = $ultimobono+3;$bono12 = $ultimobono+4;}
elseif($bono10==""){$bono10 = $ultimobono+1;$bono11 = $ultimobono+2;$bono12 = $ultimobono+3;$bono13 = $ultimobono+4;}
elseif($bono11==""){$bono11 = $ultimobono+1;$bono12 = $ultimobono+2;$bono13 = $ultimobono+3;$bono14 = $ultimobono+4;}
elseif($bono12==""){$bono12 = $ultimobono+1;$bono13 = $ultimobono+2;$bono14 = $ultimobono+3;$bono15 = $ultimobono+4;}
elseif($bono13==""){$bono13 = $ultimobono+1;$bono14 = $ultimobono+2;$bono15 = $ultimobono+3;$bono16 = $ultimobono+4;}
elseif($bono14==""){$bono14 = $ultimobono+1;$bono15 = $ultimobono+2;$bono16 = $ultimobono+3;$bono17 = $ultimobono+4;}
elseif($bono15==""){$bono15 = $ultimobono+1;$bono16 = $ultimobono+2;$bono17 = $ultimobono+3;$bono18 = $ultimobono+4;}
elseif($bono16==""){$bono16 = $ultimobono+1;$bono17 = $ultimobono+2;$bono18 = $ultimobono+3;$bono19 = $ultimobono+4;}
elseif($bono17==""){$bono17 = $ultimobono+1;$bono18 = $ultimobono+2;$bono19 = $ultimobono+3;$bono20 = $ultimobono+4;}
$monto_solicitado = $monto_solicitado + ($contador*100000);
}
if($_GET["n"]==5)
{
if($bono2==""){$bono2 = $ultimobono+1;$bono3 = $ultimobono+2;$bono4 = $ultimobono+3;$bono5 = $ultimobono+4;$bono6 = $ultimobono+5;}
elseif($bono3==""){$bono3 = $ultimobono+1;$bono4 = $ultimobono+2;$bono5 = $ultimobono+3;$bono6 = $ultimobono+4;$bono7 = $ultimobono+5;}
elseif($bono4==""){$bono4 = $ultimobono+1;$bono5 = $ultimobono+2;$bono6 = $ultimobono+3;$bono7 = $ultimobono+4;$bono8 = $ultimobono+5;}
elseif($bono5==""){$bono5 = $ultimobono+1;$bono6 = $ultimobono+2;$bono7 = $ultimobono+3;$bono8 = $ultimobono+4;$bono9 = $ultimobono+5;}
elseif($bono6==""){$bono6 = $ultimobono+1;$bono7 = $ultimobono+2;$bono8 = $ultimobono+3;$bono9 = $ultimobono+4;$bono10 = $ultimobono+5;}
elseif($bono7==""){$bono7 = $ultimobono+1;$bono8 = $ultimobono+2;$bono9 = $ultimobono+3;$bono10 = $ultimobono+4;$bono11 = $ultimobono+5;}
elseif($bono8==""){$bono8 = $ultimobono+1;$bono9 = $ultimobono+2;$bono10 = $ultimobono+3;$bono11 = $ultimobono+4;$bono12 = $ultimobono+5;}
elseif($bono9==""){$bono9 = $ultimobono+1;$bono10 = $ultimobono+2;$bono11 = $ultimobono+3;$bono12 = $ultimobono+4;$bono13 = $ultimobono+5;}
elseif($bono10==""){$bono10 = $ultimobono+1;$bono11 = $ultimobono+2;$bono12 = $ultimobono+3;$bono13 = $ultimobono+4;$bono14 = $ultimobono+5;}
elseif($bono11==""){$bono11 = $ultimobono+1;$bono12 = $ultimobono+2;$bono13 = $ultimobono+3;$bono14 = $ultimobono+4;$bono15 = $ultimobono+5;}
elseif($bono12==""){$bono12 = $ultimobono+1;$bono13 = $ultimobono+2;$bono14 = $ultimobono+3;$bono15 = $ultimobono+4;$bono16 = $ultimobono+5;}
elseif($bono13==""){$bono13 = $ultimobono+1;$bono14 = $ultimobono+2;$bono15 = $ultimobono+3;$bono16 = $ultimobono+4;$bono17 = $ultimobono+5;}
elseif($bono14==""){$bono14 = $ultimobono+1;$bono15 = $ultimobono+2;$bono16 = $ultimobono+3;$bono17 = $ultimobono+4;$bono18 = $ultimobono+5;}
elseif($bono15==""){$bono15 = $ultimobono+1;$bono16 = $ultimobono+2;$bono17 = $ultimobono+3;$bono18 = $ultimobono+4;$bono19 = $ultimobono+5;}
elseif($bono16==""){$bono16 = $ultimobono+1;$bono17 = $ultimobono+2;$bono18 = $ultimobono+3;$bono19 = $ultimobono+4;$bono20 = $ultimobono+5;}
$monto_solicitado = $monto_solicitado + ($contador*100000);
}
//////////////////////////////////////////////////////////
*/
if($_GET["n"]==1)
{
?>
<script>
function Verificar(){
if(document.form1.valor_solicitud.value==""){alert("SELECCIONE DESEMBOLSO")
document.form1.valor_solicitud.focus()
return (false);
}
return (true);
}
</script>
<?php
$saldo = $saldo_pendiente;
$valor = 100000;
$saldo_pendiente = $saldo_pendiente - $valor;
/* $saldo_pendiente = $saldo_pendiente - $valor;*/
}
if($_GET["n"]==2)
{
?>
<script>
function Verificar(){
if(document.form1.valor_solicitud.value==""){alert("SELECCIONE DESEMBOLSO")
document.form1.valor_solicitud.focus()
return (false);
}
return (true);
}
</script>
<?php
$saldo = $saldo_pendiente;
$valor = 200000;
$saldo_pendiente = $saldo_pendiente - $valor;
}
if($_GET["n"]==3)
{
?>
<script>
function Verificar(){
if(document.form1.valor_solicitud.value==""){alert("SELECCIONE DESEMBOLSO")
document.form1.valor_solicitud.focus()
return (false);
}
return (true);
}
</script>
<?php
$saldo = $saldo_pendiente;
$valor = 300000;
$saldo_pendiente = $saldo_pendiente - $valor;
}
if($_GET["n"]==4)
{
?>
<script>
function Verificar(){
if(document.form1.valor_solicitud.value==""){alert("SELECCIONE DESEMBOLSO")
document.form1.valor_solicitud.focus()
return (false);
}
return (true);
}
</script>
<?php
$saldo = $saldo_pendiente;
$valor = 400000;
$saldo_pendiente = $saldo_pendiente - $valor;
}
if($_GET["n"]==5)
{
?>
<script>
function Verificar(){
if(document.form1.valor_solicitud.value==""){alert("SELECCIONE DESEMBOLSO")
document.form1.valor_solicitud.focus()
return (false);
}
return (true);
}
</script>
<?php
$saldo = $saldo_pendiente;
$valor = 500000;
$saldo_pendiente = $saldo_pendiente - $valor;
}
if($_GET["n"]==6)
{
$saldo = $saldo_pendiente;
$valor = 600000;
$saldo_pendiente = $saldo_pendiente - $valor;
}
if($_GET["n"]==7)
{
$saldo = $saldo_pendiente;
$valor = 700000;
$saldo_pendiente = $saldo_pendiente - $valor;
}
if($_GET["n"]==8)
{
$saldo = $saldo_pendiente;
$valor = 800000;
$saldo_pendiente = $saldo_pendiente - $valor;
}
if($_GET["n"]==9)
{
$saldo = $saldo_pendiente;
$valor = 900000;
$saldo_pendiente = $saldo_pendiente - $valor;
}
if($_GET["n"]==10)
{
$saldo = $saldo_pendiente;
$valor = 1000000;
$saldo_pendiente = $saldo_pendiente - $valor;
}
if($_GET["n"]==11)
{
$saldo = $saldo_pendiente;
$valor = 1100000;
$saldo_pendiente = $saldo_pendiente - $valor;
}
?>
<table width="885" border="2" cellpadding="1" cellspacing="1">
<tr>
<td class="tdder"><table width="885" border="2" cellpadding="1" cellspacing="1">
<tr>
<td class="tdder">Fecha Solicitud:</td>
<td class="tdizq"><input name="fecha" type="text" id="fecha" value="<?php echo $fecha_solicitud ?>" size="10" maxlength="10" readonly /></td>
<td class="tdder">Nombres:</td>
<td class="tdizq" colspan="3"><input name="nombre" type="text" id="nombre" value="<?php echo $fullnombre ?>" size="60" maxlength="65" readonly/></td>
</tr>
<tr>
<td class="tdder">Cedula No:</td>
<td class="tdizq"><input name="cedula" type="text" id="cedula" value="<?php echo $cedula ?>" size="20" maxlength="20" readonly=""/></td>
<td class="tdder">Grado:</td>
<td class="tdizq"><input name="grado" type="text" id="grado" value="<?php echo $grado ?>" size="12" maxlength="10" readonly/></td>
<td class="tdder">Tipo Registro:</td>
<td class="tdizq"><input name="rango" type="text" id="rango" value="<?php echo $rango ?>" size="12" maxlength="10" readonly/></td>
</tr>
<tr>
<td class="tdder">Direccion:</td>
<td class="tdizq" colspan="2"><input name="direccion" type="text" id="direccion" value="<?php echo $direccion ?>" size="40" maxlength="40" readonly/></td>
<td class="tdder">E-mail:</td>
<td class="tdizq" colspan="2"><input name="email" type="text" id="email" value="<?php echo $email ?>" size="40" maxlength="40" readonly/></td>
</tr>
<tr>
<td class="tdder">Ciudad:</td>
<td class="tdizq"><input name="ciudad" type="text" id="ciudad" value="<?php echo $ciudad ?>" size="14" maxlength="20" readonly/></td>
<td class="tdder">Telefono:</td>
<td class="tdizq"><input name="telefono" type="text" id="telefono" value="<?php echo $telefono ?>" size="10" maxlength="20" readonly/></td>
<td class="tdder">Celular:</td>
<td class="tdizq"><input name="celular" type="text" id="celular" value="<?php echo $celular ?>" size="20" maxlength="20" readonly/></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" readonly/></td>
<td class="tdder">Banco:</td>
<td class="tdizq"><input name="banco" type="text" id="banco" value="<?php echo $banco ?>" size="15" maxlength="15" readonly/></td>
<!-- <td class="tdder">Credito Libranza:</td>
<td class="tdizq"><input name="libranza_credito" type="text" id="libranza_credito" value="<?php echo $cred ?>" size="15" maxlength="15" readonly /></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="tdrojad">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="tdrojad">SALDO PENDIENTE</td>
<td class="tdizq"><input name="saldo_pendiente" type="text" id="saldo_pendiente" value="<?php echo $saldo_pendiente ?>" size="12" maxlength="10" readonly/></td>
<td class="tdrojad">DESEMBOLSO SOLICITADO</td>
<td class="tdizq"><input type="text" name="valor_solicitud" id="valor_solicitud" value="<?php echo $valor ?>" readonly></td>
</tr>
<tr>
<td colspan="2" class="tdd">SOLICITUD DE DESEMBOLSO</td>
<td colspan="2" class="tdc"><select name="seleccioncantidad" onChange="MM_jumpMenu('parent',this,0)">
<option value="">--SELECCIONE--</option>
<option value="credito_rotativo_solicitud_pago.php?ced2=<?php echo $cedula ?>&numcon=<?php echo $numcon ?>&cred=<?php echo $cred ?>&n=1">100.000</option>
<option value="credito_rotativo_solicitud_pago.php?ced2=<?php echo $cedula ?>&numcon=<?php echo $numcon ?>&cred=<?php echo $cred ?>&n=2">200.000</option>
<option value="credito_rotativo_solicitud_pago.php?ced2=<?php echo $cedula ?>&numcon=<?php echo $numcon ?>&cred=<?php echo $cred ?>&n=3">300.000</option>
<option value="credito_rotativo_solicitud_pago.php?ced2=<?php echo $cedula ?>&numcon=<?php echo $numcon ?>&cred=<?php echo $cred ?>&n=4">400.000</option>
<option value="credito_rotativo_solicitud_pago.php?ced2=<?php echo $cedula ?>&numcon=<?php echo $numcon ?>&cred=<?php echo $cred ?>&n=5">500.000</option>
<option value="credito_rotativo_solicitud_pago.php?ced2=<?php echo $cedula ?>&numcon=<?php echo $numcon ?>&cred=<?php echo $cred ?>&n=6">600.000</option>
<option value="credito_rotativo_solicitud_pago.php?ced2=<?php echo $cedula ?>&numcon=<?php echo $numcon ?>&cred=<?php echo $cred ?>&n=7">700.000</option>
<option value="credito_rotativo_solicitud_pago.php?ced2=<?php echo $cedula ?>&numcon=<?php echo $numcon ?>&cred=<?php echo $cred ?>&n=8">800.000</option>
<option value="credito_rotativo_solicitud_pago.php?ced2=<?php echo $cedula ?>&numcon=<?php echo $numcon ?>&cred=<?php echo $cred ?>&n=9">900.000</option>
<option value="credito_rotativo_solicitud_pago.php?ced2=<?php echo $cedula ?>&numcon=<?php echo $numcon ?>&cred=<?php echo $cred ?>&n=10">1.000.000</option>
<option value="credito_rotativo_solicitud_pago.php?ced2=<?php echo $cedula ?>&numcon=<?php echo $numcon ?>&cred=<?php echo $cred ?>&n=11">1.100.000</option>
</select></td>
<td class="tdd">VALOR ANTICIPO</td>
<td class="tdc"><input type="text" name="valor_anticipo" id="valor_anticipo" value="<?php echo $valor_anticipo ?>" readonly></td>
</tr>
<!--
<tr>
<td bgcolor="#F7FFE1" ><div align="right" class="Estilo70"><strong>Valor Mensual:</strong></div></td>
<td bgcolor="#F7FFE1"><div align="left" class="Estilo70">
<input name="valcuo" type="text" id="valcuo" value="<?php echo $valcuo ?>" size="12" maxlength="12" />
</div></td>
<td bgcolor="#F7FFE1" ><div align="right" class="Estilo70"><strong>Neto Consignar:</strong></div></td>
<td bgcolor="#F7FFE1"><div align="left" class="Estilo70">
<input name="neto" type="text" id="neto" value="<?php echo $neto ?>" size="12" maxlength="12" />
</div></td>
<td bgcolor="#F7FFE1" ><div align="right" class="Estilo70"><strong>Interes Deducible:</strong></div></td>
<td bgcolor="#F7FFE1">
<div align="left">
<input name="interes" type="text" id="interes" value="<?php echo $interes ?>" size="12" maxlength="12" />
</div></td></tr>
<tr>
<td bgcolor="#F7FFE1" ><div align="right" class="Estilo70"><strong>Cuotas Pendientes:</strong></div></td>
<td bgcolor="#F7FFE1"><div align="left" class="Estilo70">
<input name="cuopen" type="text" id="cuopen" value="<?php echo $cuopen ?>" size="12" maxlength="12" />
</div></td>
<td height="31" bgcolor="#F7FFE1" class="Estilo12"><div align="center" class="Estilo12 Estilo73">
<div align="right"><strong>Cuotas Descontadas :</strong></div>
</div></td>
<td align="left" bgcolor="#F7FFE1" ><input name="cuodesc" type="text" id="cuodesc" value="<?php echo $cuodesc ?>" size="12" maxlength="12" /> </td>
<td height="28" bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Mes Aplicado:</strong></div></td>
<td bgcolor="#F7FFE1"><div align="left"><span class="Estilo71">MES</span><span class="Estilo70">-
<input name="mesapli" type="text" id="mesapli" value="<?php echo $mesapli ?>" size="2" maxlength="2" />
<strong>-AÑo</strong>
<input name="anoapli" type="text" id="anoapli" value="<?php echo $anoapli ?>" size="4" maxlength="4" />
</div> </tr>
<tr>
<td bgcolor="#F7FFE1" ><div align="right" class="Estilo70"><strong>Saldo Nuevo:</strong></div></td>
<td bgcolor="#F7FFE1"><div align="left" class="Estilo70">
<input name="salnue" type="text" id="salnue" value="<?php echo $salnue ?>" size="12" maxlength="12" readonly=""/>
</div></td>
<td height="31" bgcolor="#F7FFE1" class="Estilo12"><div align="center" class="Estilo12 Estilo73">
<div align="right"><strong>Saldo Anterior :</strong></div>
</div></td>
<td align="left" bgcolor="#F7FFE1" ><input name="salant" type="text" id="salant" value="<?php echo $salant ?>" size="12" maxlength="12" readonly=""/> </td>
<td height="28" bgcolor="#F7FFE1"><div align="right" class="Estilo70"><strong>Ultimo Desceunto:</strong></div></td>
<td bgcolor="#F7FFE1"><div align="left" class="Estilo70">
<div align="left">
<input name="fechadescuento" type="text" id="fechadescuento" value="<?php echo $fechadescuento ?>" size="10" maxlength="14" />
</div>
</div></td>
</tr>
<tr>
<td height="28" bgcolor="#F7FFE1" ><div align="right" class="Estilo70"><strong>Fecha Inicio Pagos:</strong></div></td>
<td bgcolor="#F7FFE1" colspan="2"><div align="left"><span class="Estilo71">MES</span><span class="Estilo70">
<input name="mesini" type="text" id="mesini" value="<?php echo $mesini ?>" size="1" maxlength="2" />
<strong>-AÑo</strong>
<input name="anoini" type="text" id="anoini" value="<?php echo $anoini ?>" size="4" maxlength="4" />
</span></div></td>
<td height="28" bgcolor="#F7FFE1" colspan="2"><div align="right" class="Estilo70"><strong>Fecha Termino Pagos:</strong></div></td>
<td bgcolor="#F7FFE1"><div align="left"><span class="Estilo71">MES</span><span class="Estilo70">-
<input name="mesfin" type="text" id="mesfin" value="<?php echo $mesfin ?>" size="2" maxlength="2" />
<strong>-AÑo</strong>
<input name="anofin" type="text" id="anofin" value="<?php echo $anofin ?>" size="4" maxlength="4" />
</span></div></td>
</tr>
<tr>
<td bgcolor="#F7FFE1" ><div align="right" class="Estilo70"><strong>No Desembolso:</strong></div></td>
<td bgcolor="#F7FFE1"><div align="left" class="Estilo70">
<input name="numdesem" type="text" id="numdesem" value="<?php echo $numdesem ?>" size="12" maxlength="12" />
</div></td>
<td height="31" bgcolor="#F7FFE1" class="Estilo12"><div align="center" class="Estilo12 Estilo73">
<div align="right"><strong>Unidad Descuento :</strong></div>
</div></td>
<td align="left" bgcolor="#F7FFE1" ><input name="unidesc" type="text" id="unidesc" value="<?php echo $unidesc ?>" size="12" maxlength="12" readonly=""/>
<select name="unidesc1" id="unidesc1">
<option value="">--SELECIONE UNIDAD--</option>
<option value="DACM">DACM</option>
<option value="DABF">DABF</option>
<option value="DABG">DABG</option>
<option value="DEVO">DEVO</option>
<option value="CCDO">CCDO</option>
<option value="CDDC">CDDC</option>
<option value="NNAN">NNAN</option>
<option value="NNEE">NNEE</option>
<option value="NNFA">NNFA</option>
<option value="NPCV">NPCV</option>
<option value="PCTO">PCTO</option>
<option value="PEJC">PEJC</option>
<option value="PNLG">PNLG</option>
<option value="PNPO">PNPO</option>
<option value="YYYC">YYYC</option>
<option value="YYY0">YYY0</option>
</select> </td>
<td height="31" bgcolor="#F7FFE1" class="Estilo12"><div align="center" class="Estilo12 Estilo73">
<strong>Codigo Descuento :</strong></div></td>
<td align="left" bgcolor="#F7FFE1" ><input name="codidesc" type="text" id="codidesc" value="<?php echo $codidesc ?>" size="12" maxlength="12" readonly=""/>
<select name="codidesc1" id="codidesc1">
<option value="">--SELECIONE CODIGO--</option>
<option value="200">200</option>
<option value="220">220</option>
<option value="300">300</option>
<option value="310">310</option>
<option value="420">420</option>
<option value="425">425</option>
<option value="430">430</option>
<option value="435">435</option>
<option value="475">475</option>
<option value="200">200</option>
<option value="500">500</option>
<option value="550">550</option>
<option value="575">575</option>
<option value="700">700</option>
<option value="900">900</option>
<option value="9802">9802</option>
<option value="10199">10199</option>
</select> </td>
</tr>
<tr>
<td bgcolor="#F7FFE1"><div align="center" class="Estilo55 Estilo70 Estilo73">
<div align="right"> <strong>Empresa: </strong></div>
</div></td>
<td align="left" bgcolor="#F7FFE1" colspan="2"><input name="empresa" type="text" id="empresa" value="<?php echo $empresa ?>" size="22" maxlength="20" readonly=""/>
<select name="empresa1" id="empresa1">
<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>
<td class="tdder">Proveedor :</strong></div></td>
<td align="left" bgcolor="#F7FFE1" colspan="2" ><input name="proveedor" type="text" id="proveedor" value="<?php echo $proveedor ?>" size="20" maxlength="20" readonly=""/>
<select name="proveedor1" id="proveedor1">
<option value="">--SELECCIONE PROVEEDOR--</option>
<?php
do {
?>
<option value="<?php echo $row_sql2['nombre'];?>"><?php echo $row_sql2['nombre']?></option>
<?php
} while ($row_sql2 = mysql_fetch_assoc($sql2));
$rows2 = mysql_num_rows($sql);
if($rows2 > 0) {
mysql_data_seek($sql2,0);
$row_sql2 = mysql_fetch_assoc($sql2);
}
?>
</select> </td>
</tr>
<tr>
<td bgcolor="#F7FFE1"><div align="right" class="Estilo70 Estilo74"><strong>No de Contratos:</strong></div></td>
<td align="left" bgcolor="#F7FFE1" ><input name="contrato" type="text" class="Estilo50" id="contrato" value="<?php echo $tere ?>" size="12" maxlength="12" readonly=""/></td>
<td bgcolor="#F7FFE1"><div align="right" class="Estilo70 Estilo74"><strong>Estado :</strong></div></td>
<td align="left" bgcolor="#F7FFE1" ><input name="esta" type="text" class="Estilo50" id="esta" value="<?php echo $esta ?>" size="12" maxlength="12" readonly=""/></td>
<td bgcolor="#F7FFE1"><div align="right" class="Estilo70 Estilo74"><strong>Causal :</strong></div></td>
<td align="left" bgcolor="#F7FFE1" ><input name="causal1" type="text" class="Estilo50" id="causal1" value="<?php echo $causal1 ?>" size="40" maxlength="40" readonly=""/>
<select name="causal" id="causal">
<option value="">----------SELECIONE CAUSAL-------------</option>
<option value="PAZ Y SALVO">PAZ Y SALVO</option>
<option value="CONDONACION">CONDONACION</option>
<option value="CREDITO DE DIFICIL COBRO">CREDITO DE DIFICIL COBRO</option>
<option value="POR PROCESO EJECUTIVO">POR PROCESO EJECUTIVO</option>
<option value="POR NO PAGO OPORTUNO">POR NO PAGO OPORTUNO</option>
<option value="POR NO LEGALIZACION">POR NO LEGALIZACION</option>
<option value="POR FALLECIMIENTO">POR FALLECIMIENTO</option>
</select>
</td>
-->
<!--
<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>
-->
</table></td>
</tr>
</table>
<p>
<input name="menu2" type="button" class="irmenu" id="menu2" onClick="window.location.href='menu_creditos_rotativos.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="SOLICITAR" />
</p>
</div>
</form>
</body>
</html>
<?php
if(isset($_POST["guardar"]))
{
$valor_solicitud = $_POST["valor_solicitud"];
$saldo = $saldo - $valor_solicitud;
$fecha_solicitud = date("Y-m-d");
$dis = date("d");
$mes = date("m");
$anos = date("Y");
if($_POST["saldo_pendiente"]<0)
{
echo "<script>alert('SOLICITE UN VALOR MENOR');</script>";
}
else
{
//nuevo
$consulta_validacion = mysql_query('SELECT cedula FROM credito_rotativo_inter WHERE cedula = "'.$_GET["ced2"].'" and numerocontrato = "'.$_GET["numcon"].'" ');
list($cedulaValidacion)=mysql_fetch_row($consulta_validacion);
if($cedulaValidacion != 0)
{
echo "<script>alert('YA NO PUEDE SOLICITAR, YA ESTA PAGANDO LAS CUOTAS');</script>";
}
else
{
$consulta = mysql_query('SELECT cedula, solicitud1 FROM credito_rotativo_solicitud WHERE cedula = "'.$cedula.'" ');
if (!$consulta) {
die('Invalid query consulta P: ' . mysql_error());
}
list($cedula_principal, $solicitud1)=mysql_fetch_row($consulta);
$inserta_solicitud1 = mysql_query('INSERT INTO credito_rotativo_solicitud(cedula, apellidos, nombres, grado, rango, cuenta, banco, libranza_credito, numerosolicitud, tipoo, solicitud1, fecha1, desembolso1, estado) VALUES ("'.$cedula.'", "'.$apellidos.'", "'.$nombres.'", "'.$grado.'", "'.$rango.'", "'.$cuenta.'", "'.$banco.'", "'.$cred.'", "'.$numero_solicitud.'", "SOLICITUD", "SI", "'.$fecha_solicitud.'", "'.$_POST["valor_solicitud"].'", "0" ) ');
if (!$inserta_solicitud1) {
die('Invalid query solic1: ' . mysql_error());
}
$actualiza_solicitud1 = mysql_query('UPDATE credito_rotativo SET saldo_pendiente = "'.$_POST["saldo_pendiente"].'" WHERE cedula = "'.$_POST["cedula"].'" ');
if (!$actualiza_solicitud1) {
die('Invalid query solic2: ' . mysql_error());
}
/*if($cedula_principal==0)
{
$inserta_solicitud1 = mysql_query('INSERT INTO credito_rotativo_solicitud(cedula, codigo_militar, nombre, numerocontrato, libranza_credito, solicitud1, fecha1, desembolso1, estado) VALUES ("'.$cedula.'", "'.$codigo.'", "'.$nombre.'", "'.$_GET["numcon"].'", "'.$cred.'", "SI", "'.$fecha_solicitud.'", "'.$_POST["valor_solicitud"].'", "1" ) ');
if (!$inserta_solicitud1) {
die('Invalid query solic1: ' . mysql_error());
}
$actualiza_solicitud1 = mysql_query('UPDATE credito_rotativo SET saldo_pendiente = "'.$saldo.'", estado = "2" WHERE cedula = "'.$_POST["cedula"].'" and numerocontrato = "'.$_GET["numcon"].'" ');
if (!$actualiza_solicitud1) {
die('Invalid query solic2: ' . mysql_error());
}
}
else
{
if($solicitud2=="")
{
$inserta_solicitud2 = mysql_query('UPDATE credito_rotativo_solicitud SET solicitud2 = "SI", fecha2 = "'.$fecha_solicitud.'", desembolso2 = "'.$_POST["valor_solicitud"].'" WHERE cedula = "'.$_POST["cedula"].'" and numerocontrato = "'.$_GET["numcon"].'" ) ');
$actualiza_solicitud2 = mysql_query('UPDATE credito_rotativo SET saldo_pendiente = "'.$saldo.'", estado = "2" ');
}
}*/
echo "<script>alert('Informacion de solicitud ENVIADA');</script>";
echo "<SCRIPT LANGUAGE='javascript'>window.location.href='menu_creditos_rotativos.php'</SCRIPT>";
}
}
}
?>
<?
/*
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>
";
?>