//-------------------------------------------------------//
// Author:Rodolfo Machon
// Company:WebSoft, SA de CV 
// Nombre del archivo: recibos_abonanados.js
// Created: 2015-11-01
// Updates: 2015-11-01,2022-11-16
// Copyright - All Rights Reserved
//-------------------------------------------------------//
//-------------------------------------------------------//
weekdays 	= new Array("Domingo", "Lunes", "Martes", "Miercoles", "Jueves", "Viernes", "Sabado");
months 		= new Array("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre");
today 		= new Date();
weekday 	= today.getDay();
monthday 	= today.getDate();
month 		= today.getMonth();
year 		= today.getFullYear();
weekday		= weekdays[weekday];
month 		= months[month];
dateString	= (String(weekday))+" "+(String(monthday))+" "+(String(month))+" de "+(String(year));
let windowObjectReference = null; // global variable
//-------------------------------------------------------//
window.onload = function(){

};
function Verificar(gid,eid,rid) {
    let url = "../pl/recibo_expediente_p.pl?gid="+gid+"&eid="+eid+"&rid="+rid;
    let windowName  = "ReciboExpedienteVerificar";
    let features    = "left=100,top=20,width=675,height=550,scrollbars=yes,toolbar=no,menubar=yes,resizable=yes";  
    if (windowObjectReference === null || windowObjectReference.closed) {
        windowObjectReference = window.open(url, windowName,features);
    } else {
        windowObjectReference.focus();
    }
}
function Abonar(gid,eid,rid,dte,abo) {
    if (abo!=0) {alert("Abono tiene que ser 0 para poder procesar...");}
    let url = "../pl/recibo_expediente_s.pl?gid="+gid+"&eid="+eid+"&rid="+rid+"&dt_emision="+dte;
    let windowName  = "ReciboExpedienteAbonar";
    let features    = "left=100,top=20,width=675,height=550,scrollbars=yes,toolbar=no,menubar=yes,resizable=yes";  
    if (windowObjectReference === null || windowObjectReference.closed) {
        windowObjectReference = window.open(url, windowName,features);
    } else {
        windowObjectReference.focus();
    }
}
function OpenLink(rid,dte) {
    let url = "../pl/recibo_detalles_p.pl?id="+rid+"&dt_emision="+dte;
    let windowName  = "ReciboDetalle";
    let features    = "left=100,top=20,width=675,height=550,scrollbars=yes,toolbar=no,menubar=yes,resizable=yes";  
    if (windowObjectReference === null || windowObjectReference.closed) {
        windowObjectReference = window.open(url, windowName,features);
    } else {
        windowObjectReference.focus();
    }
}
