vto_dtal="40100000"; vto_dpag="40100000"; vto_h="57200000"; vto_clave="11 "; pag_htal="57200000"; pag_hpag="40100000"; pag_clave="11 "; var NF09="" var NFY9=""; var NF7=""; var NF10="" var HOY=new Date(); // Algunos formatos para fechas. var NLDF=""; // para columnas en las queries INFORMIX var baseHtml=""; var pathFile="c:/tmprpts/"; var nomDoc=pathFile; // Donde escribe el Server var nomData=pathFile; var MES=""; if ( request.f_emision) { var pos=request.f_emision.indexOf("/") var lastPos=request.f_emision.substring(pos+1,request.f_emision.length).indexOf("/"); if ( lastPos == -1 ) MES = ""; else { lastPos=pos+lastPos+1; MES = request.f_emision.substring(pos+1,lastPos); } } else var MES=HOY.getMonth()+1; debug(MES); nomDoc=nomDoc+request.f_traspaso+MES+".html"; nomData=nomData+request.f_traspaso+MES+".txt"; var urlDoc="file:///P|/"+request.f_traspaso+MES+".html" // Donde leen los Clients var urlData="file:///P|/"+request.f_traspaso+MES+".txt" // Direcciones Finales de Campos para traspaso var p_nro_doc=6; var p_nro_lin=12; var p_f_cont=19; var p_f_emis=26; var p_centro=32; var p_cta=41; var p_tipo_apte=43; var p_importe=55; var p_clave=60; var p_concepto=91; var p_vto=98; var p_contracta=107; var SumaDebe=0; var SumaHaber=0; // Variable para Impresora y papel var PaperLines=72; // Nro. Lins. del Papel var PaperTray=60; // Nro. Lins. del Papel Bandeja var LongLine=66; // Longitud de línea // dbAcl(); //if ((!request.waux && request.lock) || request.nvo ) LoadParametros(); writeln(""); if (request.gofunc) writeln(' '); writeln(''); writeln(''); writeln(''); writeln("'); if (request.traspaso) { writeln(""); } if (request.doc_list) { writeln(""); } if (request.data_list) { writeln(""); } if( request.f_orden ) { if (!request.gofunc) { dbConnect(); LoadParametros(); var criterio="" if ( request.f_desde.length > 0 ) { var f_desde=DateFormat(request.f_desde,NLDF); if ( f_desde.substring(0,1) == "-" ) redirect("alertpage.html?alert=3"); criterio=" f_emision_pago >= '"+f_desde+"' " } if ( request.f_hasta.length > 0 ) { var f_hasta=DateFormat(request.f_hasta,NLDF); if ( f_hasta.substring(0,1) == "-" ) redirect("alertpage.html?alert=3"); if (criterio.length > 0 ) criterio=criterio+" and " criterio=criterio+" f_emision_pago <= '"+f_hasta+"' " } if ( request.v_desde.length > 0 ) { var v_desde=DateFormat(request.v_desde,NLDF); if ( v_desde.substring(0,1) == "-" ) redirect("alertpage.html?alert=3"); if (criterio.length > 0 ) criterio=criterio+" and " criterio=criterio+" f_pago >= '"+v_desde+"' " } if ( request.v_hasta.length > 0 ) { var v_hasta=DateFormat(request.v_hasta,NLDF); if ( v_hasta.substring(0,1) == "-" ) redirect("alertpage.html?alert=3"); if (criterio.length > 0 ) criterio=criterio+" and " criterio=criterio+" f_pago <= '"+v_hasta+"' " } if ( request.h_mes_fra.length > 0 ) { if (criterio.length > 0 ) criterio=criterio+" and " criterio=criterio+" facturas.mes >= '"+request.d_mes_fra+"' and facturas.mes <= '"+request.h_mes_fra+"'" } else { if ( request.d_mes_fra.length > 0 ) { if (criterio.length > 0 ) criterio=criterio+" and " criterio=criterio+" facturas.mes = '"+request.d_mes_fra+"'" } } if ( request.h_cod_centro.length > 0 ) { if (criterio.length > 0 ) criterio=criterio+" and " criterio=criterio+" cod_centro <= '"+request.d_cod_centro+"' and cod_centro >= '"+request.h_cod_centro+"' " } else { if ( request.d_cod_centro.length > 0 ) { if (criterio.length > 0 ) criterio=criterio+" and " criterio=criterio+" cod_centro matches '"+request.d_cod_centro+"'" } } if ( request.nif.length > 0 ) { if (criterio.length > 0 ) criterio=criterio+" and " criterio=criterio+" facturas.nif matches '"+request.nif+"'" } if ( request.h_nro_fra.length > 0 ) { if (criterio.length > 0 ) criterio=criterio+" and " criterio=criterio+" facturas.nro_fra >= '"+request.d_nro_fra+"' and facturas.nro_fra <= '"+request.h_nro_fra+"'" } else { if ( request.d_nro_fra.length > 0 ) { if (criterio.length > 0 ) criterio=criterio+" and " criterio=criterio+" facturas.nro_fra = '"+request.d_nro_fra+"'" } } if ( request.h_nro_regn.length > 0 ) { if (criterio.length > 0 ) criterio=criterio+" and " criterio=criterio+" facturas.nro_reg >= '"+StringClip(true,request.d_nro_regy)+StringClip(true,request.d_nro_regn)+"' and facturas.nro_reg <= '"+StringClip(true,request.h_nro_regy)+StringClip(true,request.h_nro_regn)+"'" } else { if ( request.d_nro_regn.length > 0 ) { if (criterio.length > 0 ) criterio=criterio+" and " criterio=criterio+" facturas.nro_reg = '"+StringClip(true,request.d_nro_regy)+StringClip(true,request.d_nro_regn)+"'" } } if ( request.razon_social.length > 0 ) { if (criterio.length > 0 ) criterio=criterio+" and " var razon_social=request.razon_social; // var lowcaps = request.razon_social.toLowerCase(); // var uppercaps = request.razon_social.toUpperCase(); criterio=criterio+"razon_social matches '"+razon_social+"'" } if (criterio.length > 0 ) criterio=criterio+" and " criterio=criterio+"traspaso_"+request.f_traspaso+" != 'S' " if ( request.f_traspaso == "vto" ) { if (criterio.length > 0 ) criterio=criterio+" and " criterio=criterio+" vto_pago is not null and nro_reg_vto not matches ' *' " } if ( request.f_traspaso == "pago" ) { if (criterio.length > 0 ) criterio=criterio+" and " criterio=criterio+" vto_pago is not null " } request.criterio=criterio; } } criterio="Traspaso"; writeln("'); if ( request.FrameType == "F" || request.FrameType == "T" ) { writeln(""); } if (!request.waux) { if (request.gofunc) { writeln(''); writeln(''); writeln(' '); } else { writeln(''); writeln(''); }