//-------------------------------------------------------//
// Author:Rodolfo Machon
// Company:WebSoft, SA de CV 
// Nombre del archivo: generar_partida_contable_ingresos_general.js
// Created: 2023-03-28
// Updates: 2023-03-28
// Copyright - All Rights Reserved
//-------------------------------------------------------//
//-------------------------------------------------------//
let windowObjectReference = null;
//-------------------------------------------------------//
window.onload = function(){
	resizeTo(500,200);
	LoadToday();	
};
//-------------------------------------------------------//
//LEVEL 1
function GetToday(){
    var today 		= new Date();
    var monthday        = today.getDate();
    var month 		= today.getMonth()+1;
    var year 		= today.getFullYear();
    if(monthday<10){monthday="0"+monthday}
    if(month<10){month="0"+month}
    var fetc = year+"-"+month+"-"+monthday;
    return fetc;
}
function ShowCalendar(form,datetype,separator){
        var openwindow;
	if (!openwindow || openwindow.closed){
		win ="window.open('../libraries/html/clnd.html?pbf="+form+"&datetype="+datetype+"&separator="+separator+"','Calendar','left=200,top=200,width=250,height=250,scrollbars=no,toolbar=no,menu=no')";
		openwindow=eval(win);
	}else{openwindow.focus()}
}
function Generar(){
        var openwindow11;
	var desde = document.form.dt_desde.value;
	var hasta = document.form.dt_hasta.value;
	if(desde==""){alert("Favor Ingresar la Fecha Desde");return}	
	if(hasta==""){alert("Favor Ingresar la Fecha Hasta");return}
	if (!openwindow11 || openwindow11.closed){
		win ="window.open('../pl/generar_partida_contable_ingresos_general.pl?dt_desde="+desde+"&dt_hasta="+hasta+"','GenerarPartidaContable','left=100,top=20,width=675,height=550,scrollbars=yes,toolbar=no,menubar=yes,resizable=yes')";
			openwindow11=eval(win);
	}else{openwindow11.focus()}
	//close();
}
function LoadToday(){
	FechaHoy = GetToday();
	document.form.dt_desde.value=FechaHoy;
	document.form.dt_hasta.value=FechaHoy;	
}