From 170557d88cd4a2543eb4d40de527ce1636af96c3 Mon Sep 17 00:00:00 2001 From: JesusPerez Date: Fri, 1 Oct 2021 20:28:38 +0100 Subject: [PATCH] chore: html pages --- alertpage.html | 87 ++ ctasapagar.html | 57 ++ error.html | 126 +++ fr_botleft.html | 27 + fr_botright.html | 22 + fr_bottom.html | 13 + fr_conten.html | 73 ++ fr_main.html | 34 + fr_maintop.html | 26 + fr_top.html | 33 + g_albaran.html | 419 +++++++++ g_banco.html | 214 +++++ g_centro.html | 210 +++++ g_clave.html | 208 +++++ g_condpago.html | 211 +++++ g_ctascont.html | 210 +++++ g_docpago.html | 802 +++++++++++++++++ g_factura.html | 550 ++++++++++++ g_listados.html | 134 +++ g_localidad.html | 208 +++++ g_pedido.html | 222 +++++ g_proveedor.html | 214 +++++ g_trasp_old.html | 578 +++++++++++++ g_traspaso.html | 566 ++++++++++++ g_vto.html | 600 +++++++++++++ g_vtos.html | 566 ++++++++++++ go_close.html | 26 + go_frame.html | 26 + go_page.html | 20 + help.html | 20 + help_contents.html | 74 ++ help_navbar.html | 23 + helptopics.html | 432 ++++++++++ home.html | 78 ++ initial.html | 128 +++ l_albaran.html | 368 ++++++++ l_factura.html | 419 +++++++++ l_pedido.html | 414 +++++++++ l_prevision.html | 160 ++++ l_proveedor.html | 414 +++++++++ logged_out.html | 45 + login.html | 80 ++ logout.html | 75 ++ o_albaran.html | 784 +++++++++++++++++ o_apunte.html | 445 ++++++++++ o_banco.html | 506 +++++++++++ o_centro.html | 205 +++++ o_clave.html | 186 ++++ o_condpago.html | 207 +++++ o_ctascont.html | 212 +++++ o_factura.html | 2034 ++++++++++++++++++++++++++++++++++++++++++++ o_localidad.html | 186 ++++ o_parame.html | 473 ++++++++++ o_pedido.html | 358 ++++++++ o_proveedor.html | 406 +++++++++ o_unlockfra.html | 404 +++++++++ o_vto.html | 492 +++++++++++ o_vtos.html | 459 ++++++++++ obras.html | 19 + reinitial.html | 127 +++ w_auxiliar.html | 35 + w_auxnavbar.html | 32 + wrongbrw.html | 24 + 63 files changed, 16806 insertions(+) create mode 100644 alertpage.html create mode 100644 ctasapagar.html create mode 100644 error.html create mode 100644 fr_botleft.html create mode 100644 fr_botright.html create mode 100644 fr_bottom.html create mode 100644 fr_conten.html create mode 100644 fr_main.html create mode 100644 fr_maintop.html create mode 100644 fr_top.html create mode 100644 g_albaran.html create mode 100644 g_banco.html create mode 100644 g_centro.html create mode 100644 g_clave.html create mode 100644 g_condpago.html create mode 100644 g_ctascont.html create mode 100644 g_docpago.html create mode 100644 g_factura.html create mode 100644 g_listados.html create mode 100644 g_localidad.html create mode 100644 g_pedido.html create mode 100644 g_proveedor.html create mode 100644 g_trasp_old.html create mode 100644 g_traspaso.html create mode 100644 g_vto.html create mode 100644 g_vtos.html create mode 100644 go_close.html create mode 100644 go_frame.html create mode 100644 go_page.html create mode 100644 help.html create mode 100644 help_contents.html create mode 100644 help_navbar.html create mode 100644 helptopics.html create mode 100644 home.html create mode 100644 initial.html create mode 100644 l_albaran.html create mode 100644 l_factura.html create mode 100644 l_pedido.html create mode 100644 l_prevision.html create mode 100644 l_proveedor.html create mode 100644 logged_out.html create mode 100644 login.html create mode 100644 logout.html create mode 100644 o_albaran.html create mode 100644 o_apunte.html create mode 100644 o_banco.html create mode 100644 o_centro.html create mode 100644 o_clave.html create mode 100644 o_condpago.html create mode 100644 o_ctascont.html create mode 100644 o_factura.html create mode 100644 o_localidad.html create mode 100644 o_parame.html create mode 100644 o_pedido.html create mode 100644 o_proveedor.html create mode 100644 o_unlockfra.html create mode 100644 o_vto.html create mode 100644 o_vtos.html create mode 100644 obras.html create mode 100644 reinitial.html create mode 100644 w_auxiliar.html create mode 100644 w_auxnavbar.html create mode 100644 wrongbrw.html diff --git a/alertpage.html b/alertpage.html new file mode 100644 index 0000000..98a13c7 --- /dev/null +++ b/alertpage.html @@ -0,0 +1,87 @@ + + + + Main Frame in FrameSet + + + + + + +// + + + + + diff --git a/ctasapagar.html b/ctasapagar.html new file mode 100644 index 0000000..bb0a07b --- /dev/null +++ b/ctasapagar.html @@ -0,0 +1,57 @@ + +Cuentas a Pagar + + + + + + +var baseHtml=""; +if (!request.FrameType || request.FrameType == "null" ) + redirect("logout.html"); +dbAcl(); +client.prevPage ='ctasapagar.html?""'+baseHtml; +if (request.FrameType =="F") { + writeln(''); + writeln(' '); + writeln(' '); + writeln(' '); + if ( client.MsgScroll == "S" ) + writeln(' '); + else + writeln(' '); + writeln(' '); + writeln(' '); + writeln(' '); + writeln(' '); + writeln(' '); + writeln(' '); + writeln(' '); + writeln(' '); + writeln(''); +} +if (request.FrameType =="T") { + writeln(''); + writeln(' '); + writeln(' '); + if ( client.MsgScroll == "S" ) + writeln(' '); + else + writeln(' '); + writeln(' '); + writeln(' '); + writeln(''); +} +if (request.FrameType =="L") { + writeln(''); + writeln(' '); + writeln(' '); + writeln(''); +} + + diff --git a/error.html b/error.html new file mode 100644 index 0000000..acbc497 --- /dev/null +++ b/error.html @@ -0,0 +1,126 @@ + + + + Error de Conexión a la Base de Datos + + + + + +if (request.alert) { +// + +

Gestor de Base de Datos:   ERROR

+ +

+


Parámetros de Conexión utilizados:

+ +

+ + +// write(" Status: " + status + "\n"); + writeln("

Tipo de Servidor: " + client.type + "

\n"); + writeln("

Identificador del Servidor: " + client.server + "

\n"); + writeln("

Identificador Usuario ID: " + client.db_id + "

\n"); +// writeln(" Password: " + client.password + "\n"); + writeln("

Password: [not shown]

\n"); + writeln("

Base de Datos: " + client.database + "

\n");

+ +

Comprobar los manuales y documentación del Gestor de Base de +Datos para más informiación acerca de los siguientes códigos +de error:

+ +

+ + if ( client.trans == true ) { + writeln("

Transacción Abortada

\n"); + client.trans == false + } + writeln("

Status: " + client.status + "\n"); + writeln("

DbStatus: " + client.dbstatus + "\n"); + writeln("

Major Error: " + client.majorErrorCode + "\n"); + writeln(client.majorErrorMessage + "

\n"); + writeln("

Minor Error: " + client.minorErrorCode + "\n"); + writeln(client.minorErrorMessage + "

\n"); + + +writeSignature(false) + + diff --git a/fr_botleft.html b/fr_botleft.html new file mode 100644 index 0000000..4ab84d8 --- /dev/null +++ b/fr_botleft.html @@ -0,0 +1,27 @@ + + + + + + + + + + + +
+ + +if (request.FrameType == "F") { + writeln(''); + writeln(''); +} + + + + + diff --git a/fr_botright.html b/fr_botright.html new file mode 100644 index 0000000..8238d45 --- /dev/null +++ b/fr_botright.html @@ -0,0 +1,22 @@ + + + + + + + + + + + +

+Ayuda +Logout +

+ + + diff --git a/fr_bottom.html b/fr_bottom.html new file mode 100644 index 0000000..535bab3 --- /dev/null +++ b/fr_bottom.html @@ -0,0 +1,13 @@ + + + + + Bottom Navigation Bar Frame in FrameSet + + + + +writeSignature(false) + + diff --git a/fr_conten.html b/fr_conten.html new file mode 100644 index 0000000..686de69 --- /dev/null +++ b/fr_conten.html @@ -0,0 +1,73 @@ + + + + Table of Contents Frame in FrameSet + + + + + + +var baseHtml="frame"; +dbAcl(); +writeln('

'); +writeln(''); +writeln(''); +writeln(''); +writeln(''); +writeln(''); +writeln(''); +writeln(''); +writeln(''); +writeln(''); +writeln(''); +writeln(''); +writeln(''); +writeln(''); +if (request.uid== "100001") { + writeln(''); + writeln(''); + writeln(''); + writeln(''); +} +writeln(''); +writeln('
Listados
Facturas
Albaranes
Proveedores
Pedidos
Centros
Cuentas
Claves
Cond.Pago
Bancos
Localidades
Vencimientos
Doc. Pago
Traspasos
Desbloqueo
Parámetros
Colas
'); +
+

+

+ +
+

Estructura Página:

+
+

+ + +if (request.FrameType == "L") { + writeln('

'); + writeln('
'); +} +if (request.FrameType == "T") { + writeln('
'); + writeln('
'); +} +if (request.FrameType == "F") { + writeln('
'); + writeln('
'); +} +else { + writeln('
'); + writeln('
Ayuda'); + writeln('Logout
'); +} +

+ + + diff --git a/fr_main.html b/fr_main.html new file mode 100644 index 0000000..716abde --- /dev/null +++ b/fr_main.html @@ -0,0 +1,34 @@ + + + + Main Frame in FrameSet + + + + + +
 
+ +
+ + + +
+
+
+ +

Cuentas a Pagar

+ + + if (request.goback){ + writeln(' 

'); + writeln('

Volver

'); + writeln('
Volver') + } + +
 
+ + + diff --git a/fr_maintop.html b/fr_maintop.html new file mode 100644 index 0000000..5857abe --- /dev/null +++ b/fr_maintop.html @@ -0,0 +1,26 @@ + + + + + + + + + + + +
+ + +//if (request.FrameType == "F") { +//} + +

Construcciones SANDO +       Dpto. Cuentas a pagar

+ + + + diff --git a/fr_top.html b/fr_top.html new file mode 100644 index 0000000..e741d43 --- /dev/null +++ b/fr_top.html @@ -0,0 +1,33 @@ + + + + + + + + +

+ + + + + + + + + + + + + + + + + + + +

+ + diff --git a/g_albaran.html b/g_albaran.html new file mode 100644 index 0000000..681559e --- /dev/null +++ b/g_albaran.html @@ -0,0 +1,419 @@ + + + +albaranes + + +var HOY=new Date(); +// Algunos formatos para fechas. +var NLDF="YY/M/D"; // para columnas en las queries INFORMIX +var baseHtml=""; +dbAcl(); +if (request.gofunc) + writeln(' '); +writeln(''); +writeln(''); +if (request.gofunc) { + writeln("'); +} +if ( request.search1 || request.search2 || request.desde || request.hasta || request.f_orden) { + dbConnect(); + if (!request.gofunc) { + if ( request.search1 || request.desde || request.hasta ) { + //Si se busca usando el texto de entrada + if (request.desde && request.hasta) { + var desde_fecha=DateFormat(request.desde,NLDF); + if ( desde_fecha.substring(0,1) == "-" ) + redirect("alertpage.html?alert=3"); + var hasta_fecha=DateFormat(request.hasta,NLDF); + if ( hasta_fecha.substring(0,1) == "-" ) + redirect("alertpage.html?alert=3"); + c_albaranes = database.cursor("SELECT * FROM albaranes,proveedores WHERE albaranes.nif=proveedores.nif and fecha_emision Between '" + + desde_fecha + "' and '"+ hasta_fecha + "' ORDER BY " + client.criteria); + } + } else if (request.search1) { + c_facturas = database.cursor("SELECT * FROM albaranes,proveedores WHERE albaranes.nif=proveedores.nif and "+ client.criteria +" MATCHES '" + + request.search1 + "' ORDER BY " + client.criteria); + } else if (request.f_orden) { + 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=" fecha_emision >= '"+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+" fecha_emision <= '"+f_hasta+"' " + } + if ( request.cod_centro.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" cod_centro matches '"+request.cod_centro+"'" + } + if ( request.nif.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" albaranes.nif matches '"+request.nif+"'" + } + if ( request.nro_reg.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" albaranes.nro_reg matches '"+StringClip(true,request.nro_reg)+"'" + } + 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+"'" + } + c_albaranes = database.cursor("SELECT * FROM albaranes,proveedores WHERE albaranes.nif=proveedores.nif and "+ criterio + + " ORDER BY " + request.f_orden); + } + if (!c_albaranes) + DbsError(false,-1); + client.search1 = request.search1; + } + if(request.search2) { + if(request.search2 == "all") { + //Selecciono todos los albaranes, sin criterio + c_albaranes = database.cursor("SELECT * FROM albaranes,proveedores where albaranes.nif=proveedores.nif ORDER BY nro_reg "); + if (!c_albaranes) + DbsError(false,-1); + } + else { + //Selecciona todas las filas en las que el descripcion empieza con la letra elejida. + var lowcaps = request.search2.toLowerCase(); + if (client.criteria == "razon_social" ) + c_albaranes = database.cursor("SELECT * FROM albaranes,proveedores "+ + " WHERE albaranes.nif=proveedores.nif and proveedores." + + client.criteria + " MATCHES '" + request.search2 + "*' OR proveedores." + + client.criteria +" MATCHES '" + lowcaps + "*'"+ + " ORDER BY " + client.criteria); + else + c_albaranes = database.cursor("SELECT * FROM albaranes,proveedores "+ + " WHERE albaranes.nif=proveedores.nif and albaranes." + + client.criteria + " MATCHES '" + request.search2 + "*' OR albaranes." + + client.criteria +" MATCHES '" + lowcaps + "*'"+ + " ORDER BY " + client.criteria); + if (!c_albaranes) + DbsError(false,-1); + client.search2 = request.search2; + } + } +} +else { + if (!request.nro_reg && !request.fecha_emision ) { + request.multiple ="Múltiple"; + } +} +if (request.fecha_emision) { + client.criteria="fecha_emision"; + client.des_criteria="cuya fecha de emisión"; +} +if (request.multiple ) { + client.criteria="multiple"; + client.des_criteria="según criterio de búsqueda "; +} +writeln("'); +criterio="criterio múltiple"; +if ( client.criteria == "multiple") + criterio="criterio múltiple"; +if ( client.criteria == "fecha_emision" ) + criterio="por fecha emision"; +if ( request.FrameType == "F" || request.FrameType == "T" ) { + writeln(""); +} +if (!request.waux) { + if (request.gofunc) { + writeln(''); + writeln(''); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + diff --git a/g_banco.html b/g_banco.html new file mode 100644 index 0000000..ba7c5b9 --- /dev/null +++ b/g_banco.html @@ -0,0 +1,214 @@ + + + +bancos + + +var baseHtml=""; +dbAcl(); +if (request.gofunc) + writeln(' '); +writeln(''); +writeln(''); +if (request.gofunc) { + writeln("'); +} +if(request.search1 || request.search2) { + dbConnect(); + if(request.search1 && !request.gofunc) { + //Si se busca usando el texto de entrada + c_bancos = database.cursor("SELECT * FROM bancos WHERE "+ client.criteria +" MATCHES '" + request.search1 + "' ORDER BY " + client.criteria); + if (!c_bancos) + DbsError(false,-1); + client.search1 = request.search1; + } + if(request.search2 && !request.gofunc) { + if(request.search2 == "all") { + //Selecciono todos los bancos, sin criterio + c_bancos = database.cursor("SELECT * FROM bancos ORDER BY nombre "); + if (!c_bancos) + DbsError(false,-1); + } + else { + //Selecciona todas las filas en las que el nombre empieza con la letra elejida. + var lowcaps = request.search2.toLowerCase(); + c_bancos = database.cursor("SELECT * FROM bancos WHERE "+ client.criteria + " MATCHES '" + request.search2 + "*' OR " + client.criteria +" MATCHES '" + lowcaps + "*' ORDER BY " + client.criteria); + if (!c_bancos) + DbsError(false,-1); + } + client.search2 = request.search2; + } +} +else { + if (!request.cod_banco && !request.nombre ) { + request.nombre ="nombre "; + } +} +if (request.cod_banco) { + client.criteria="cod_banco"; + client.des_criteria="cuyo código"; +} +if (request.nombre ) { + client.criteria="nombre "; + client.des_criteria="cuya nombre"; +} +if ( client.criteria == "nombre " ) { + criterio=" por Nombre "; +} +if ( client.criteria == "cod_banco" ) { + criterio=" por Código "; +} +if ( request.FrameType == "F" || request.FrameType == "T" ) { + writeln(""); +} +if (!request.waux) { + if (request.gofunc) { + writeln(''); + writeln(''); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + diff --git a/g_centro.html b/g_centro.html new file mode 100644 index 0000000..3d0b3f8 --- /dev/null +++ b/g_centro.html @@ -0,0 +1,210 @@ + + + +centros + + +var baseHtml=""; +dbAcl(); +if (request.gofunc) + writeln(' '); +writeln(''); +writeln(''); +if (request.gofunc) { + writeln("'); +} +if(request.search1 || request.search2) { + dbConnect(); + if(request.search1 && !request.gofunc) { + //Si se busca usando el texto de entrada + c_centros = database.cursor("SELECT * FROM centros WHERE "+ client.criteria +" MATCHES '" + request.search1 + "' ORDER BY " + client.criteria); + if (!c_centros) + DbsError(false,-1); + client.search1 = request.search1; + } + if(request.search2 && !request.gofunc) { + if(request.search2 == "all") { + //Selecciono todos los centros, sin criterio + c_centros = database.cursor("SELECT * FROM centros ORDER BY descripcion "); + if (!c_centros) + DbsError(false,-1); + } + else { + //Selecciona todas las filas en las que el descripcion empieza con la letra elejida. + var lowcaps = request.search2.toLowerCase(); + c_centros = database.cursor("SELECT * FROM centros WHERE "+ client.criteria + " MATCHES '" + request.search2 + "*' OR " + client.criteria +" MATCHES '" + lowcaps + "*' ORDER BY " + client.criteria); + if (!c_centros) + DbsError(false,-1); + } + client.search2 = request.search2; + } +} +else { + if (!request.cod_centro && !request.descripcion ) { + request.descripcion ="descripcion"; + } +} +if (request.cod_centro) { + client.criteria="cod_centro"; + client.des_criteria="cuyo código"; +} +if (request.descripcion ) { + client.criteria="descripcion "; + client.des_criteria="cuya descripción"; +} +if ( client.criteria == "descripcion " ) { + criterio=" por descripción "; +} +if ( client.criteria == "cod_centro" ) { + criterio=" por Código "; +} +if ( request.FrameType == "F" || request.FrameType == "T" ) { + writeln(""); +} +if (!request.waux) { + if (request.gofunc) { + writeln(''); + writeln(''); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + diff --git a/g_clave.html b/g_clave.html new file mode 100644 index 0000000..1ef0ef0 --- /dev/null +++ b/g_clave.html @@ -0,0 +1,208 @@ + + + +claves + + +var baseHtml=""; +dbAcl(); +if (request.gofunc) + writeln(' '); +writeln(''); +writeln(''); +if (request.gofunc) { + writeln("'); +} +if(request.search1 || request.search2) { + dbConnect(); + if(request.search1 && !request.gofunc) { + //Si se busca usando el texto de entrada + c_claves = database.cursor("SELECT * FROM claves WHERE "+ client.criteria +" MATCHES '" + request.search1 + "' ORDER BY " + client.criteria); + if (!c_claves) + DbsError(false,-1); + client.search1 = request.search1; + } + if(request.search2 && !request.gofunc) { + if(request.search2 == "all") { + //Selecciono todos los claves, sin criterio + c_claves = database.cursor("SELECT * FROM claves ORDER BY "+client.criteria+" "); + if (!c_claves) + DbsError(false,-1); + } + else { + //Selecciona todas las filas en las que el descripcion empieza con la letra elejida. + var lowcaps = request.search2.toLowerCase(); + c_claves = database.cursor("SELECT * FROM claves WHERE "+ client.criteria + " MATCHES '" + request.search2 + "*' OR " + client.criteria +" MATCHES '" + lowcaps + "*' ORDER BY " + client.criteria); + if (!c_claves) + DbsError(false,-1); + } + client.search2 = request.search2; + } +} +else { + if (!request.cod_clave && !request.descripcion ) { + request.descripcion ="descripcion "; + } +} +if (request.cod_clave) { + client.criteria="cod_clave"; + client.des_criteria="cuyo código"; +} +if (request.descripcion ) { + client.criteria="descripcion "; + client.des_criteria="cuya descripción"; +} +if ( client.criteria == "descripcion " ) + criterio=" por descripcion "; +if ( client.criteria == "cod_clave" ) + criterio=" por Código "; +if ( request.FrameType == "F" || request.FrameType == "T" ) { + writeln(""); +} +if (!request.waux) { + if (request.gofunc) { + writeln(''); + writeln(''); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + diff --git a/g_condpago.html b/g_condpago.html new file mode 100644 index 0000000..c2d4dbd --- /dev/null +++ b/g_condpago.html @@ -0,0 +1,211 @@ + + + +Condiciones de Pago + + +var baseHtml=""; +dbAcl(); +if (request.gofunc) + writeln(' '); +writeln(''); +writeln(''); +if (request.gofunc) { + writeln("'); +} +if(request.search1 || request.search2) { + dbConnect(); + if(request.search1 && !request.gofunc) { + //Si se busca usando el texto de entrada + c_cond_pago = database.cursor("SELECT * FROM cond_pago WHERE "+ client.criteria +" MATCHES '" + request.search1 + "' ORDER BY " + client.criteria); + if (!c_cond_pago) + DbsError(false,-1); + client.search1 = request.search1; + } + if(request.search2 && !request.gofunc) { + if(request.search2 == "all") { + //Selecciono todos los cond_pago, sin criterio + c_cond_pago = database.cursor("SELECT * FROM cond_pago ORDER BY descripcion"); + if (!c_cond_pago) + DbsError(false,-1); + } + else { + //Selecciona todas las filas en las que el nombre empieza con la letra elejida. + var lowcaps = request.search2.toLowerCase(); + c_cond_pago = database.cursor("SELECT * FROM cond_pago WHERE "+ client.criteria + " MATCHES '" + request.search2 + "*' OR " + client.criteria +" MATCHES '" + lowcaps + "*' ORDER BY " + client.criteria); + if (!c_cond_pago) + DbsError(false,-1); + } + client.search2 = request.search2; + } +} +else { + if (!request.cond_pago && !request.descripcion) { + request.descripcion="descripcion"; + } +} +if (request.cond_pago) { + client.criteria="cond_pago"; + client.des_criteria="cuya N.I.F."; +} +if (request.descripcion) { + client.criteria="descripcion"; + client.des_criteria="cuya razón social"; +} +if ( client.criteria == "descripcion" ) { + criterio=" por Descripción "; +} +if ( client.criteria == "cond_pago" ) { + criterio=" por Código "; +} +if ( request.FrameType == "F" || request.FrameType == "T" ) { + writeln(""); +} +if (!request.waux) { + if (request.gofunc) { + writeln(''); + writeln(''); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + + diff --git a/g_ctascont.html b/g_ctascont.html new file mode 100644 index 0000000..cc850cb --- /dev/null +++ b/g_ctascont.html @@ -0,0 +1,210 @@ + + + +ctasconts + + +var baseHtml=""; +dbAcl(); +if (request.gofunc) + writeln(' '); +writeln(''); +writeln(''); +if (request.gofunc) { + writeln("'); +} +if(request.search1 || request.search2) { + dbConnect(); + if(request.search1 && !request.gofunc) { + //Si se busca usando el texto de entrada + c_ctasconts = database.cursor("SELECT * FROM ctas_contables WHERE "+ client.criteria +" MATCHES '" + request.search1 + "' ORDER BY " + client.criteria); + if (!c_ctasconts) + DbsError(false,-1); + client.search1 = request.search1; + } + if(request.search2 && !request.gofunc) { + if(request.search2 == "all") { + //Selecciono todos los ctasconts, sin criterio + c_ctasconts = database.cursor("SELECT * FROM ctas_contables ORDER BY "+client.criteria+" "); + if (!c_ctasconts) + DbsError(false,-1); + } + else { + //Selecciona todas las filas en las que el descripcion empieza con la letra elejida. + var lowcaps = request.search2.toLowerCase(); + c_ctasconts = database.cursor("SELECT * FROM ctas_contables WHERE "+ client.criteria + " MATCHES '" + request.search2 + "*' OR " + client.criteria +" MATCHES '" + lowcaps + "*' ORDER BY " + client.criteria); + if (!c_ctasconts) + DbsError(false,-1); + } + client.search2 = request.search2; + } +} +else { + if (!request.cta_contable && !request.descripcion ) { + request.descripcion ="descripcion "; + } +} +if (request.cta_contable) { + client.criteria="cta_contable"; + client.des_criteria="cuyo código"; +} +if (request.descripcion ) { + client.criteria="descripcion "; + client.des_criteria="cuya descripción"; +} +if ( client.criteria == "descripcion " ) { + criterio=" por descripcion "; +} +if ( client.criteria == "cta_contable" ) { + criterio=" por Código "; +} +if ( request.FrameType == "F" || request.FrameType == "T" ) { + writeln(""); +} +if (!request.waux) { + if (request.gofunc) { + writeln(''); + writeln(''); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + diff --git a/g_docpago.html b/g_docpago.html new file mode 100644 index 0000000..ae228b3 --- /dev/null +++ b/g_docpago.html @@ -0,0 +1,802 @@ + + + +Doc. Pago de facturas + + + + + + +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 nprinter="ep1170"; +var spoolpath=""; +var pathFile="c:/tmprpts/"; +var nomFile=pathFile+request.uid+"_pag.html"; // Donde escribe el Server +var nomCarta=pathFile+request.uid+"_car.html"; +var nomFich=pathFile+request.uid+"_fic.txt"; +var nomTest=pathFile+request.uid+"_tst.html"; +var nomList=pathFile+request.uid+"_lst.html"; +var urlFile="file:///P|/"+request.uid+"_pag.html" // Donde leen los Clients +var urlCarta="file:///P|/"+request.uid+"_car.html" +var urlFich="file:///P|/"+request.uid+"_fic.txt" +var urlTest="file:///P|/"+request.uid+"_tst.html" +var urlList="file:///P|/"+request.uid+"_lst.html" +// Variable para Impresora y papel +var BodyLines=8; // Nro. Lins. del Cuerpo +var PaperLines=72; // Nro. Lins. del Papel Pagaré +var PaperTray=60; // Nro. Lins. del Papel Bandeja +var PaperTLines=74; // Nro. Lins. del Papel Talón +var HeadPosLin=20; // Nro. Lin. de Cabecera (luego del logo) +var FootPosLin=43; // Nro. Lin. del Pie (pagaré) +var CompLetOn=""; // Código on Letra comprimida +var CompLetOff=""; // Código off Letra comprimida +var LongLine=66; // Longitud de línea +var CarPad="-"; // Caracter de relleno +// Variables de traducción de dígitos -- Se ha fracasado con matrices en el SERVER + var mat_un_0=""; + var mat_un_1=""; + var mat_un_2=""; + var mat_un_3=""; + var mat_un_4=""; + var mat_un_5=""; + var mat_un_6=""; + var mat_un_7=""; + var mat_un_8=""; + var mat_un_9=""; + var mat_ud_0=""; + var mat_ud_1=""; + var mat_ud_2=""; + var mat_ud_3=""; + var mat_ud_4=""; + var mat_ud_5=""; + var mat_ud_6=""; + var mat_ud_7=""; + var mat_ud_8=""; + var mat_ud_9=""; + var mat_de_1=""; + var mat_de_2=""; + var mat_de_3=""; + var mat_de_4=""; + var mat_de_5=""; + var mat_de_6=""; + var mat_de_7=""; + var mat_de_8=""; + var mat_de_9=""; + var mat_ce_1=""; + var mat_ce_2=""; + var mat_ce_3=""; + var mat_ce_4=""; + var mat_ce_5=""; + var mat_ce_6=""; + var mat_ce_7=""; + var mat_ce_8=""; + var mat_ce_9=""; + var mat_mll_1=""; + var mat_mll_2=""; + var mat_mll_3=""; + var mat_mll_4=""; + var mat_mll_5=""; + var mat_mll_6=""; + var mat_mll_7=""; + var mat_mll_8=""; + var mat_mll_9=""; + var let_ciens=""; // cientos + var let_cient=""; // ciento + var let_cien=""; // cien + var let_plus100=""; // ciento + var let_un=""; // un + var let_mil=""; // mil + var let_mill=""; // cadena "llón" + var let_mills=""; // cadena "llones" + var let_con=""; // con para decimales + var car_dec=""; // carácter decimales + var num_let=""; // resultado + var num_let2=""; // resultado + var tx_cent=""; + var tx_dece=""; + var tx_und=""; + var tx_mll=""; + var txletmll=""; + var txletmil=""; + var linPad=""; +dbAcl(); +if (request.doc_clean) { + cleanup_docspago(); + redirect(addClient("g_docpago.html?"+baseHtml)); +} +if (request.doc_pago) { + if (updPagoFras()) { + cleanup_docspago(); + redirect(addClient("g_docpago.html?"+baseHtml)); + } +} +if (request.doc_delete) { + // Borramos en tabla de pagos datos del usuario + if ( request.h_nro_doc != "0" ) { + criteria=" nro_doc_pago >= '"+NroUnformat(request.d_nro_doc)+"' and nro_doc_pago <= '"+NroUnformat(request.h_nro_doc)+"'"; + } else { + criteria=" nro_doc_pago = '"+NroUnformat(request.d_nro_doc)+"'"; + } + client.is_trans=true; + database.beginTransaction(); + c_docspago = database.cursor("SELECT nro_reg FROM docspago WHERE uid='"+request.uid+"' and "+ criteria+" order by nro_reg "); + while (c_docspago.next()) { + // DesBloquear factura + status=database.execute("UPDATE facturas SET is_locked='' WHERE nro_reg='"+c_docspago.nro_reg+"'"); + } + c_docspago.close(); + status=database.execute("DELETE FROM docspago WHERE uid=\'" + request.uid+ "\' and "+criteria); + database.commitTransaction(); + client.is_trans=false; +} +if (request.gofunc) + writeln(' '); +writeln(''); +writeln(''); +writeln(''); +writeln("'); +if (request.docpago) { + writeln(""); +} +if (request.doc_list) { + writeln(""); +} +if (request.f_tipo_doc_pago == "2" && request.doc_carta) { + writeln(""); +} +if (request.f_tipo_doc_pago == "2" && request.doc_file) { + writeln(""); +} +if (request.test) { + writeln(""); +} +if( request.f_orden && !request.test) { + 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 >= '"+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 <= '"+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+"'" + } + var nro=parseFloat(NroUnformat(request.f_importe_min)); + critIMP=""; + if ( nro > 0 ) { + critIMP=" and importe_total >= '"+nro+"'" + } + if (criterio.length > 0 ) + criterio=" and "+criterio; + request.criterio=criterio; + c_facturas = database.cursor("SELECT * FROM facturas,proveedores,centros WHERE facturas.nif=proveedores.nif and facturas.cod_centro=centros.cod_centro "+ + " and is_locked !='S' and f_emision_pago is null and proveedores.cond_pago != '"+client.pa_cp_lock+"'"+ + " and tipo_doc_pago ='"+request.f_tipo_doc_pago+"' "+ + " and facturas.cond_pago != '"+client.pa_cp_lock+"' and importe_total > 0 "+criterio + + critIMP+" ORDER BY " + request.f_orden); + } +// if (!c_facturas) +// DbsError(false,-1); +// else { +// writeln(""); +// c_facturas.close(); +// } +} +criterio="Doc. Pago"; +writeln("'); +if ( request.FrameType == "F" || request.FrameType == "T" ) { + writeln(""); +} +if (!request.waux) { + if (request.gofunc) { + writeln(''); + writeln(''); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + diff --git a/g_factura.html b/g_factura.html new file mode 100644 index 0000000..149f93e --- /dev/null +++ b/g_factura.html @@ -0,0 +1,550 @@ + + + +facturas + + +var NF9="" +var NF10="" +var HOY=new Date(); +var linea=""; +// Algunos formatos para fechas. +var NLDF=""; // para columnas en las queries INFORMIX +var baseHtml=""; +dbAcl(); +if (request.gofunc) + writeln(' '); +writeln(''); +writeln(''); +writeln("'); +if(request.search1 || request.search2 || request.desde || request.hasta || request.f_orden) { + if (!request.gofunc) { + dbConnect(); +// if(request.search1 || request.desde || request.hasta || request.multiple || request.f_orden) { + //Si se busca usando el texto de entrada + if (request.desde && request.hasta) { + var desde_fecha=DateFormat(request.desde,NLDF); + if ( desde_fecha.substring(0,1) == "-" ) + redirect("alertpage.html?alert=3"); + var hasta_fecha=DateFormat(request.hasta,NLDF); + if ( hasta_fecha.substring(0,1) == "-" ) + redirect("alertpage.html?alert=3"); + c_facturas = database.cursor("SELECT * FROM facturas,proveedores WHERE facturas.nif=proveedores.nif and "+ client.criteria +" Between '" + + desde_fecha + "' and '"+ hasta_fecha + "' ORDER BY " + client.criteria); + } + else if (request.search1) { + c_facturas = database.cursor("SELECT * FROM facturas,proveedores WHERE facturas.nif=proveedores.nif and "+ client.criteria +" MATCHES '" + + request.search1 + "' ORDER BY " + client.criteria); + } + else if (request.f_orden) { + 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 >= '"+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 <= '"+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+" vto_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+" vto_pago <= '"+v_hasta+"' " + } + if ( request.cod_centro.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" cod_centro matches '"+request.cod_centro+"'" + } + if ( request.nif.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" facturas.nif matches '"+request.nif+"'" + } + if ( request.nro_fra.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" facturas.nro_fra matches '"+request.nro_fra+"'" + } + if ( request.nro_regn.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" facturas.nro_reg matches '"+StringClip(true,request.nro_regy)+StringClip(true,request.nro_regn)+"'" + } + 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 matches '"+request.d_mes_fra+"'" + } + } + if ( request.h_nro_doc_pago.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" facturas.nro_doc_pago >= '"+request.d_nro_doc_pago+"' and facturas.nro_doc_pago <= '"+request.h_nro_doc_pago+"'" + } else { + if ( request.d_nro_doc_pago.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" facturas.nro_doc_pago matches '"+request.d_nro_doc_pago+"'" + } + } + 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+"'" + } + c_facturas = database.cursor("SELECT * FROM facturas,proveedores WHERE facturas.nif=proveedores.nif and "+ criterio + + " ORDER BY " + request.f_orden); + } + if (!c_facturas) + DbsError(false,-1); + client.search1 = request.search1; + } + if(request.search2) { + if(request.search2 == "all") { + //Selecciono todos los facturas, sin criterio + c_facturas = database.cursor("SELECT * FROM facturas,proveedores where facturas.nif=proveedores.nif ORDER BY nro_reg "); + if (!c_facturas) + DbsError(false,-1); + } + else { + //Selecciona todas las filas en las que el descripcion empieza con la letra elejida. + var lowcaps = request.search2.toLowerCase(); + c_facturas = database.cursor("SELECT * FROM facturas f,proveedores "+ + " WHERE facturas.nif=proveedores.nif and " + + client.criteria + " MATCHES '" + request.search2 + "*' OR " + + client.criteria +" MATCHES '" + lowcaps + "*'"+ + " ORDER BY " + client.criteria); + if (!c_facturas) + DbsError(false,-1); + } + client.search2 = request.search2; + } +// } +} +else { + if (!request.nro_reg && !request.f_emision && !request.nif && !request.cod_centro ) { + request.multiple ="Múltiple"; + } +} +if (request.fecha_emision) { + client.criteria="f_emision"; + client.des_criteria="cuya fecha de emisión"; +} +if (request.vto_pago) { + client.criteria="vto_pago"; + client.des_criteria="cuyo vto. de pago"; +} +if (request.multiple ) { + client.criteria="multiple"; + client.des_criteria="según criterio de búsqueda "; +} +writeln("'); +criterio="criterio múltiple"; +if ( client.criteria == "multiple") + criterio="criterio múltiple"; +if ( client.criteria == "f_emision" ) + criterio="por fecha emision"; +if ( client.criteria == "vto_pago" ) + criterio="por vto. de pago"; +if ( request.FrameType == "F" || request.FrameType == "T" ) { + writeln(""); +} +if (!request.waux) { + if (request.gofunc) { + writeln(''); + writeln(''); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + diff --git a/g_listados.html b/g_listados.html new file mode 100644 index 0000000..d36908a --- /dev/null +++ b/g_listados.html @@ -0,0 +1,134 @@ + + + +Listado de facturas + + + + +var NF9="" +var NF10="" +var HOY=new Date(); +// Algunos formatos para fechas. +var NLDF=""; // para columnas en las queries INFORMIX +var baseHtml=""; +dbAcl(); +if (request.gofunc) + writeln(' '); +writeln(''); +writeln(''); +writeln(''); +writeln("'); +criterio=""; +if ( request.FrameType == "F" || request.FrameType == "T" ) { + writeln(""); +} +if (!request.waux) { + if (request.gofunc) { + writeln(''); + writeln(''); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + diff --git a/g_localidad.html b/g_localidad.html new file mode 100644 index 0000000..7833c4d --- /dev/null +++ b/g_localidad.html @@ -0,0 +1,208 @@ + + + +localidades + + +var baseHtml=""; +dbAcl(); +if (request.gofunc) + writeln(' '); +writeln(''); +writeln(''); +if (request.gofunc) { + writeln("'); +} +if(request.search1 || request.search2) { + dbConnect(); + if(request.search1 && !request.gofunc) { + //Si se busca usando el texto de entrada + c_localidades = database.cursor("SELECT * FROM localidades WHERE "+ client.criteria +" MATCHES '" + request.search1 + "' ORDER BY " + client.criteria); + if (!c_localidades) + DbsError(false,-1); + client.search1 = request.search1; + } + if(request.search2 && !request.gofunc) { + if(request.search2 == "all") { + //Selecciono todos los localidades, sin criterio + c_localidades = database.cursor("SELECT * FROM localidades ORDER BY "+client.criteria+" "); + if (!c_localidades) + DbsError(false,-1); + } + else { + //Selecciona todas las filas en las que el descripcion empieza con la letra elejida. + var lowcaps = request.search2.toLowerCase(); + c_localidades = database.cursor("SELECT * FROM localidades WHERE "+ client.criteria + " MATCHES '" + request.search2 + "*' OR " + client.criteria +" MATCHES '" + lowcaps + "*' ORDER BY " + client.criteria); + if (!c_localidades) + DbsError(false,-1); + } + client.search2 = request.search2; + } +} +else { + if (!request.cod_localidad && !request.descripcion ) { + request.descripcion ="descripcion "; + } +} +if (request.cod_localidad) { + client.criteria="cod_localidad"; + client.des_criteria="cuyo código"; +} +if (request.descripcion ) { + client.criteria="descripcion "; + client.des_criteria="cuya descripción"; +} +if ( client.criteria == "descripcion " ) + criterio=" por descripcion "; +if ( client.criteria == "cod_localidad" ) + criterio=" por Código "; +if ( request.FrameType == "F" || request.FrameType == "T" ) { + writeln(""); +} +if (!request.waux) { + if (request.gofunc) { + writeln(''); + writeln(''); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + diff --git a/g_pedido.html b/g_pedido.html new file mode 100644 index 0000000..5ce06a6 --- /dev/null +++ b/g_pedido.html @@ -0,0 +1,222 @@ + + + +Pedidos + + +var baseHtml=""; +dbAcl(); +if (request.gofunc) + writeln(' '); +writeln(''); +writeln(''); +if (request.gofunc) { + writeln("'); +} +if(request.search1 || request.search2) { + dbConnect(); + if(request.search1 && !request.gofunc) { + //Si se busca usando el texto de entrada + c_pedidos = database.cursor("SELECT * FROM pedidos WHERE "+ client.criteria +" MATCHES '" + request.search1 + "' ORDER BY " + client.criteria); + if (!c_pedidos) + DbsError(false,-1); + client.search1 = request.search1; + } + if(request.search2 && !request.gofunc) { + if(request.search2 == "all") { + //Selecciono todos los pedidos, sin criterio + c_pedidos = database.cursor("SELECT * FROM pedidos ORDER BY descripcion "); + if (!c_pedidos) + DbsError(false,-1); + } + else { + //Selecciona todas las filas en las que el descripcion empieza con la letra elejida. + var lowcaps = request.search2.toLowerCase(); + c_pedidos = database.cursor("SELECT * FROM pedidos WHERE "+ client.criteria + " MATCHES '" + request.search2 + "*' OR " + client.criteria +" MATCHES '" + lowcaps + "*' ORDER BY " + client.criteria); + if (!c_pedidos) + DbsError(false,-1); + } + client.search2 = request.search2; + } +} +else { + if (!request.nro_pedido && !request.descripcion ) { + request.descripcion ="descripcion"; + } +} +if (request.nro_pedido) { + client.criteria="nro_pedido"; + client.des_criteria="cuyo número"; +} +if (request.descripcion ) { + client.criteria="descripcion "; + client.des_criteria="cuya descripción"; +} +if ( client.criteria == "descripcion " ) + criterio=" por descripción "; +if ( client.criteria == "nro_pedido" ) + criterio=" por número "; +if ( request.FrameType == "F" || request.FrameType == "T" ) { + writeln(""); +} +if (!request.waux) { + if (request.gofunc) { + writeln(''); + writeln(''); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + + diff --git a/g_proveedor.html b/g_proveedor.html new file mode 100644 index 0000000..533f501 --- /dev/null +++ b/g_proveedor.html @@ -0,0 +1,214 @@ + + + +Proveedores + + +var baseHtml=""; +dbAcl(); +if (request.gofunc) + writeln(' '); +writeln(''); +writeln(''); +if (request.gofunc) { + writeln("'); +} +if(request.search1 || request.search2) { + dbConnect(); + if(request.search1 && !request.gofunc) { + //Si se busca usando el texto de entrada + c_proveedores = database.cursor("SELECT * FROM proveedores WHERE "+ client.criteria +" MATCHES '" + request.search1 + "' ORDER BY " + client.criteria); + if (!c_proveedores) + DbsError(false,-1); + client.search1 = request.search1; + } + if(request.search2 && !request.gofunc) { + if(request.search2 == "all") { + //Selecciono todos los proveedores, sin criterio + c_proveedores = database.cursor("SELECT * FROM proveedores ORDER BY razon_social"); + if (!c_proveedores) + DbsError(false,-1); + } + else { + //Selecciona todas las filas en las que el nombre empieza con la letra elejida. + var lowcaps = request.search2.toLowerCase(); + c_proveedores = database.cursor("SELECT * FROM proveedores WHERE "+ client.criteria + " MATCHES '" + request.search2 + "*' OR " + client.criteria +" MATCHES '" + lowcaps + "*' ORDER BY " + client.criteria); + if (!c_proveedores) + DbsError(false,-1); + } + client.search2 = request.search2; + } +} +else { + if (!request.nif && !request.razon_social) { + request.razon_social="razon_social"; + } +} +if (request.nif) { + client.criteria="nif"; + client.des_criteria="cuya N.I.F."; +} +if (request.razon_social) { + client.criteria="razon_social"; + client.des_criteria="cuya razón social"; +} +if ( client.criteria == "razon_social" ) { + criterio=" por Razón Social "; +} +if ( client.criteria == "nif" ) { + criterio=" por N.I.F. "; +} +if ( request.FrameType == "F" || request.FrameType == "T" ) { + writeln(""); +} +if (!request.waux) { + if (request.gofunc) { + writeln(''); + writeln(''); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + diff --git a/g_trasp_old.html b/g_trasp_old.html new file mode 100644 index 0000000..39b65ad --- /dev/null +++ b/g_trasp_old.html @@ -0,0 +1,578 @@ + + + +Traspaso de facturas + + + + + +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(''); +} + diff --git a/g_traspaso.html b/g_traspaso.html new file mode 100644 index 0000000..9e32765 --- /dev/null +++ b/g_traspaso.html @@ -0,0 +1,566 @@ + + + +Traspaso de facturas + + + + + +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" +var jusnum=""; +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(''); +} + diff --git a/g_vto.html b/g_vto.html new file mode 100644 index 0000000..d16a65e --- /dev/null +++ b/g_vto.html @@ -0,0 +1,600 @@ + + + +vtos + + +var NF9="" +var NF10="" +var HOY=new Date(); +var linea=""; +// Algunos formatos para fechas. +var NLDF=""; // para columnas en las queries INFORMIX +var baseHtml=""; +dbAcl(); +if (request.gofunc) + writeln(' '); +writeln(''); +writeln(''); +writeln("'); +if(request.search1 || request.search2 || request.desde || request.hasta || request.f_orden) { + if (!request.gofunc) { + dbConnect(); +// if(request.search1 || request.desde || request.hasta || request.multiple || request.f_orden) { + //Si se busca usando el texto de entrada + if (request.desde && request.hasta) { + var desde_fecha=DateFormat(request.desde,NLDF); + if ( desde_fecha.substring(0,1) == "-" ) + redirect("alertpage.html?alert=3"); + var hasta_fecha=DateFormat(request.hasta,NLDF); + if ( hasta_fecha.substring(0,1) == "-" ) + redirect("alertpage.html?alert=3"); + c_facturas = database.cursor("SELECT * FROM facturas,proveedores WHERE facturas.nif=proveedores.nif and "+ client.criteria +" Between '" + + desde_fecha + "' and '"+ hasta_fecha + "' ORDER BY " + client.criteria); + } + else if (request.search1) { + c_facturas = database.cursor("SELECT * FROM facturas,proveedores WHERE facturas.nif=proveedores.nif and "+ client.criteria +" MATCHES '" + + request.search1 + "' ORDER BY " + client.criteria); + } + else if (request.f_orden) { + 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 >= '"+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 <= '"+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+" vto_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+" vto_pago <= '"+v_hasta+"' " + } + if ( request.cod_centro.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" cod_centro matches '"+request.cod_centro+"'" + } + if ( request.nif.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" facturas.nif matches '"+request.nif+"'" + } + if ( request.nro_fra.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" facturas.nro_fra matches '"+request.nro_fra+"'" + } + if ( request.nro_regn.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" facturas.nro_reg matches '"+StringClip(true,request.nro_regy)+StringClip(true,request.nro_regn)+"'" + } + 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 matches '"+request.d_mes_fra+"'" + } + } + if ( request.h_nro_doc_pago.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" facturas.nro_doc_pago >= '"+request.d_nro_doc_pago+"' and facturas.nro_doc_pago <= '"+request.h_nro_doc_pago+"'" + } else { + if ( request.d_nro_doc_pago.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" facturas.nro_doc_pago matches '"+request.d_nro_doc_pago+"'" + } + } + if ( request.h_nro_reg_vton.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" facturas.nro_reg_vto >= '"+StringClip(true,request.d_nro_reg_vtoy)+StringClip(true,request.d_nro_reg_vton)+"' and facturas.nro_reg_vto <= '"+StringClip(true,request.h_nro_reg_vtoy)+StringClip(true,request.h_nro_reg_vton)+"'" + } else { + if ( request.d_nro_reg_vton.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" facturas.nro_reg_vto matches '"+StringClip(true,request.d_nro_reg_vtoy)+StringClip(true,request.d_nro_reg_vton)+"'" + } + } + 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+"'" + } + c_facturas = database.cursor("SELECT * FROM facturas,proveedores WHERE facturas.nif=proveedores.nif and "+ criterio + + " ORDER BY " + request.f_orden); + } + if (!c_facturas) + DbsError(false,-1); + client.search1 = request.search1; + } + if(request.search2) { + if(request.search2 == "all") { + //Selecciono todos los facturas, sin criterio + c_facturas = database.cursor("SELECT * FROM facturas,proveedores where facturas.nif=proveedores.nif ORDER BY nro_reg "); + if (!c_facturas) + DbsError(false,-1); + } + else { + //Selecciona todas las filas en las que el descripcion empieza con la letra elejida. + var lowcaps = request.search2.toLowerCase(); + c_facturas = database.cursor("SELECT * FROM facturas f,proveedores "+ + " WHERE facturas.nif=proveedores.nif and " + + client.criteria + " MATCHES '" + request.search2 + "*' OR " + + client.criteria +" MATCHES '" + lowcaps + "*'"+ + " ORDER BY " + client.criteria); + if (!c_facturas) + DbsError(false,-1); + } + client.search2 = request.search2; + } +// } +} +else { + if (!request.nro_reg && !request.f_emision && !request.nif && !request.cod_centro ) { + request.multiple ="Múltiple"; + } +} +if (request.fecha_emision) { + client.criteria="f_emision"; + client.des_criteria="cuya fecha de emisión"; +} +if (request.vto_pago) { + client.criteria="vto_pago"; + client.des_criteria="cuyo vto. de pago"; +} +if (request.multiple ) { + client.criteria="multiple"; + client.des_criteria="según criterio de búsqueda "; +} +writeln("'); +criterio="criterio múltiple"; +if ( client.criteria == "multiple") + criterio="criterio múltiple"; +if ( client.criteria == "f_emision" ) + criterio="por fecha emision"; +if ( client.criteria == "vto_pago" ) + criterio="por vto. de pago"; +if ( request.FrameType == "F" || request.FrameType == "T" ) { + writeln(""); +} +if (!request.waux) { + if (request.gofunc) { + writeln(''); + writeln(''); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + diff --git a/g_vtos.html b/g_vtos.html new file mode 100644 index 0000000..5ef2bec --- /dev/null +++ b/g_vtos.html @@ -0,0 +1,566 @@ + + + +vtos + + +var NF9="" +var NF10="" +var HOY=new Date(); +var linea=""; +// Algunos formatos para fechas. +var NLDF=""; // para columnas en las queries INFORMIX +var baseHtml=""; +dbAcl(); +if (request.gofunc) + writeln(' '); +writeln(''); +writeln(''); +writeln("'); +if(request.search1 || request.search2 || request.desde || request.hasta || request.f_orden) { + if (!request.gofunc) { + dbConnect(); +// if(request.search1 || request.desde || request.hasta || request.multiple || request.f_orden) { + //Si se busca usando el texto de entrada + if (request.desde && request.hasta) { + var desde_fecha=DateFormat(request.desde,NLDF); + if ( desde_fecha.substring(0,1) == "-" ) + redirect("alertpage.html?alert=3"); + var hasta_fecha=DateFormat(request.hasta,NLDF); + if ( hasta_fecha.substring(0,1) == "-" ) + redirect("alertpage.html?alert=3"); + c_facturas = database.cursor("SELECT * FROM facturas,proveedores WHERE facturas.nif=proveedores.nif and "+ client.criteria +" Between '" + + desde_fecha + "' and '"+ hasta_fecha + "' ORDER BY " + client.criteria); + } + else if (request.search1) { + c_facturas = database.cursor("SELECT * FROM facturas,proveedores WHERE facturas.nif=proveedores.nif and "+ client.criteria +" MATCHES '" + + request.search1 + "' ORDER BY " + client.criteria); + } + else if (request.f_orden) { + 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 >= '"+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 <= '"+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+" vto_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+" vto_pago <= '"+v_hasta+"' " + } + if ( request.cod_centro.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" cod_centro matches '"+request.cod_centro+"'" + } + if ( request.nif.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" facturas.nif matches '"+request.nif+"'" + } + if ( request.nro_fra.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" facturas.nro_fra matches '"+request.nro_fra+"'" + } + if ( request.nro_regn.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" facturas.nro_reg matches '"+StringClip(true,request.nro_regy)+StringClip(true,request.nro_regn)+"'" + } + 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 matches '"+request.d_mes_fra+"'" + } + } + if ( request.h_nro_doc_pago.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" facturas.nro_doc_pago >= '"+request.d_nro_doc_pago+"' and facturas.nro_doc_pago <= '"+request.h_nro_doc_pago+"'" + } else { + if ( request.d_nro_doc_pago.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" facturas.nro_doc_pago matches '"+request.d_nro_doc_pago+"'" + } + } + 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+"'" + } + c_facturas = database.cursor("SELECT * FROM facturas,proveedores WHERE facturas.nif=proveedores.nif and "+ criterio + + " ORDER BY " + request.f_orden); + } + if (!c_facturas) + DbsError(false,-1); + client.search1 = request.search1; + } + if(request.search2) { + if(request.search2 == "all") { + //Selecciono todos los facturas, sin criterio + c_facturas = database.cursor("SELECT * FROM facturas,proveedores where facturas.nif=proveedores.nif ORDER BY nro_reg "); + if (!c_facturas) + DbsError(false,-1); + } + else { + //Selecciona todas las filas en las que el descripcion empieza con la letra elejida. + var lowcaps = request.search2.toLowerCase(); + c_facturas = database.cursor("SELECT * FROM facturas f,proveedores "+ + " WHERE facturas.nif=proveedores.nif and " + + client.criteria + " MATCHES '" + request.search2 + "*' OR " + + client.criteria +" MATCHES '" + lowcaps + "*'"+ + " ORDER BY " + client.criteria); + if (!c_facturas) + DbsError(false,-1); + } + client.search2 = request.search2; + } +// } +} +else { + if (!request.nro_reg && !request.f_emision && !request.nif && !request.cod_centro ) { + request.multiple ="Múltiple"; + } +} +if (request.fecha_emision) { + client.criteria="f_emision"; + client.des_criteria="cuya fecha de emisión"; +} +if (request.vto_pago) { + client.criteria="vto_pago"; + client.des_criteria="cuyo vto. de pago"; +} +if (request.multiple ) { + client.criteria="multiple"; + client.des_criteria="según criterio de búsqueda "; +} +writeln("'); +criterio="criterio múltiple"; +if ( client.criteria == "multiple") + criterio="criterio múltiple"; +if ( client.criteria == "f_emision" ) + criterio="por fecha emision"; +if ( client.criteria == "vto_pago" ) + criterio="por vto. de pago"; +if ( request.FrameType == "F" || request.FrameType == "T" ) { + writeln(""); +} +if (!request.waux) { + if (request.gofunc) { + writeln(''); + writeln(''); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + diff --git a/go_close.html b/go_close.html new file mode 100644 index 0000000..2659e7e --- /dev/null +++ b/go_close.html @@ -0,0 +1,26 @@ + + + + + + +// + + + + diff --git a/go_frame.html b/go_frame.html new file mode 100644 index 0000000..7a6afec --- /dev/null +++ b/go_frame.html @@ -0,0 +1,26 @@ + + + + + +// + + + + + + diff --git a/go_page.html b/go_page.html new file mode 100644 index 0000000..216f3a7 --- /dev/null +++ b/go_page.html @@ -0,0 +1,20 @@ + + + + +// + + + + + + diff --git a/help.html b/help.html new file mode 100644 index 0000000..a702a00 --- /dev/null +++ b/help.html @@ -0,0 +1,20 @@ + + + + + + + + + +Ayuda en Línea + + + + + diff --git a/help_contents.html b/help_contents.html new file mode 100644 index 0000000..dd0fcff --- /dev/null +++ b/help_contents.html @@ -0,0 +1,74 @@ + + + + + + +

+ +

Indice de Contenidos:

+ +

 

+ +

Introducción:

+ +
    +

    Que es

    Que hace

    +
+ +

Tecnología y Plataforma.

+ +

Esquema y estructura de datos. Como usar esta Aplicación:

+ +

 

+ +

Como usar cursor, ratón y navegador.

+ +
    +

    Pantalla de Entrada. +

    Menú Principal. +

    Facturas. +

    Albaranes. +

    Proveedores. +

    Pedidos. +

    Centros. +

    Cuentas Contables. +

    Claves. +

    Condiciones de pago. +

    Bancos. +

    Documentos de pago. +

    Previsiones de pago. +

    Informes. +

    Traspaso. +

    Copias. +

      +

+ +

Soporte Técnico y servicios.

+ +

 

+ +


+ +

+ + diff --git a/help_navbar.html b/help_navbar.html new file mode 100644 index 0000000..7bc436f --- /dev/null +++ b/help_navbar.html @@ -0,0 +1,23 @@ + + + + + + + + +

+ + + + + + +
+ + + +
+ + + diff --git a/helptopics.html b/helptopics.html new file mode 100644 index 0000000..6d20e36 --- /dev/null +++ b/helptopics.html @@ -0,0 +1,432 @@ + + + + Tock Help + + + +

Help


+ +

Introducción. ¿Que es?, ¿Que hace?.

+ + + +


+ +

Esquema y estructura de datos. Como Usar esta Aplicación:

+ +

+ +

Como usar cursor, ratón y navegador.

+ +

En primer lugar significar que con el ratón funciona todo solamente +apuntando al campo o a la opción a utilizar.

+ +

Para avanzar el cursor de un campo a otro solo se puede hacer con el +tabulador, para retroceder al anterior shitf + tabulador, una vez terminados +de rellenar los campos necesarios se desplaza el cursor con el tabulador +o con el ratón directamente hacia la opción que necesite (busqueda, +confirmar, ver, alta, etc..) y se pulsa la barra espaciadora(*).

+ +

Para enfocar de un frame(*) a otro solo se puede hacer con el ratón, +por ejemplo:

+ +

En la pantalla de facturas, ésta aparece a su derecha (1 frame), +y el menu principal a su izquierda (2º frame, mas pequeño), +si quiere trabajar en facturas debe de apuntar a ese frame con el ratón +para que el cursor se sitúe al principio y la misma operación +debe realizar si quiere paar al frame pequeño, del menú principal +en este caso.

+ +

* La barra espaciadora en este caso hace la misma función que +INTRO.

+ +

* Se puede definir Frame como una pantalla dentro de otra que puede ser +de diversos tamaños.

+ +

Navegador Netscape Gold 3.0.

+ +

Algunos conceptos básicos para el uso del navegador:

+ +

 

+ +

 

+ +

Running Reports

+ +

Step One: Enter the Date

+ +

The first step for all reports is to select a date range. If you do not +select a date range your report will default to the last 7 days (including +today).

+ +

To select a date range click on the radio button associated with either +a set amount of time (last 7 days, last 14 days or month to date) or input +your own date range in mm/dd/yy format.

+ +

Last 7 days, 14 days and month to date all include date from today.

+ +

 

+ +

Step Two: Choose either a summary or detail report

+ +

To run a summary report select how you want the report broken +down from the pop up menu and click on the Create Summary Report button.

+ +

 

+ +
    +
  • A summary report by employee lists the total hours entered for each + employee during the date range you selected.
    + +
  • A summary report by project lists the total hours entered for each + project during the date range you selected.
    + +
  • A summary report by group lists the total hours entered for each group + during the date range you selected.
    + +
  • A summary report by category lists the total hours entered for each + category during the date range you selected. +

    To run a detail report you first choose one of the four categories: + Employee, Group, Project or Type of Work by clicking on the corresponding + radio button. Then use the select list to choose the item for which you + would like generate a report. Click Create Detail Report to produce the + report. +

      +

    Editing Your Entries +

    You can edit your hours entries from the report section. Select your + name in the employee list under Detail Report. Select all entries in the + select list. Click CREATE DETAIL REPORT to run the report. Click a field + of the entry you want to edit. Change whatever details you want, then click + Update to save your changes. +


    Preferences and User Information

    +

    Entering your information +

    Password: Your user name and a temporary password will be added + to the system by your administrator. You may go in at any time to change + your password by clicking on Change Password link. You will need to know + your current password to change your password. +

    You can update most of your information by changing the text or selection + lists on the preferences page and then clicking the SAVE CHANGES button. +

    Only your administrator can change your active status, full/part time + status, and group. +

    User Preferences +

    Active Projects: The projects you select here will show up on + your hours entry page. You may select as many as you like (you may need + to hold down the control or apple key to make multiple selections). If + a project you will be working on is not listed, contact your administrator. +

    Default Project: Select the project that you work on the most + often from the pop up menu (it must be one of your active projects). Your + enter hours page will default to this project if no other project is selected. +

    Default Type of Work: Select the type of work that you do the + most often from the pop up menu. Your enter hours page will default to + this type of work if no other type of work is selected. +

    After making any changes click on SAVE CHANGES and your information + will be updated to the database. +


    Administration

    +

    Add User: Enter the user's information and click on Add User. + Required information is: first name, last name, user name, temporary password, + group, and project information. You can update this information at any + time. Only administrators can edit the active status, full/part time status, + and group fields. The user's login, password, first name, last name, title, + email, and phone can not contain double quotes. The user's email and phone + can not contain single quotes. +

    Add Group: Type in the group name. Choose group members from + the select list. You may select as many as you wish (you may need to hold + down the control or apple key to make multiple selections). Remember, a + user can only be a member of one group at a time. Click on Add Group. The + group name can not contain single or double quotes. +

    Add Project: Type in the project name. Choose Active or Inactive, + and Billable or Non Billable from the select lists. Click on Add Project. + The project name can not contain single or double quotes. +

    Add Type of Work: Type in the name of the new type of work. Click + on Add Type of Work. The name of the type of work can not contain single + or double quotes. +

    Edit User: Choose a user from the select list that you would + like to edit and click on USER. Follow the same directions for Add User + to edit user information. Click SAVE CHANGES to update the user information. + To delete a user click on Delete User. You may only delete a user if they + have never entered any hours. If you want to prevent a user from logging + in, make the user inactive. The user's login, password, first name, last + name, title, email, and phone can not contain double quotes. The user's + email and phone can not contain single quotes. +

    Reset Password: If a user has forgotten his or her password, + select the user from the list and click USER. From the user information + screen, click on Reset Password. This will reset the user's password to + his or her user id. +

    Edit Group: To edit the group name only, change the name and + then click on UPDATE THIS GROUP. You can also move users into and out of + the group you are editing. A user can only be in one group at a time. If + you remove a user from a group they will be put into the special group + called No Group. If you add a user to a group you will automatically take + him or her out of the group he or she is in currently. +

    Group Members, Group Name: If you choose a name from this select + list and click on UPDATE THIS GROUP this person will be removed from the + group and added to No Group. The group name can not contain single or double + quotes. +

    All Other Employees: If you choose a name from this select list + and click on UPDATE THIS GROUP this person will be added to the group which + you are editing and deleted from whatever group s/he was in previously. +

    Deleting a Group: You may only delete a group if it has no members. + Once you remove all of the members, click on DELETE THIS GROUP. +

    Edit a Project: You may a edit the project name by changing the + text and clicking on UPDATE PROJECT. You may also change the status of + a project: Inactive or Active and Billable or Non Billable; by selecting + the correct status from the select lists and then clicking on UPDATE PROJECTS. + A project cannot be deleted if hours have been entered for it. If you no + longer need a project, make it project inactive. The project name can not + contain single or double quotes. +

    Edit Type of Work: You may change the type of work by changing + the text and then clicking on UPDATE TYPE OF WORK. You may not delete a + category if hours have been entered using that type of work. +

    The name of the type of work can not contain single or double quotes. +


    Troubleshooting and Known + Problems

    +

    Navigator 2.0

    This application is not recommended for + use with Navigator 2.0.x. Several problems in 2.0 versions of Navigator + prevent some areas of the application from working properly. These include + (but may not be limited to): +
      +
    • Radio buttons are ordered differently for JavaScript in Navigator 2.0.x + and 3.0. On the reports screen the radio buttons will not be selected properly + using Navigator 2.0.x. On Navigator 2.0.x for the Macintosh, it's possible + to have more than one radio button selected. +
    • The help system does not work for Navigator 2.0.x Unix versions. +
    • Java Script functions are sometimes not called correctly using Navigator + 2.0.x. This problem has been reported on the login screen, on the hours + entry screen, and on the reports screen. +
    +

    The Java applet on the hours entry screen uses Live Connect to update + itself based on user input. This functionality is only available with Netscape + 3.0 browsers. +

    Admin privileges

    You can delete all users with admin privileges. + If you do this, you will not be able to create new users or change the + admin privileges of users to get admin privileges back. We recommend that + you do not ever delete the admin user created during the install (username + admin, password admin) in case you accidentally remove admin privileges + from all other uses. +

    Alphabetical Order

    Every list of projects, types of work, users, + etc. is alphabetized. However, the lists are alphabetized using ASCII collating + sequence, which means that lowercase letters come after uppercase letters. + If your projects, types of work, etc. start with both upper and lowercase + letters, the entries will not seem to be ordered. We recommend that you + start all items with either uppercase or lowercase letters, not both. +

    Logging out and the back button

    After you log out of the system, + you can still see screens using the back button. If you try to click on + anything on these screens, you will be asked to log in again. If you have + sensitive information on these screens, you may want to exit the browser + before leaving your machine. +

    Dates

    Java Script can not work with dates before 1970. If you + enter a two digit year less than 70 (for example, 8/5/15), the year will + be added to 2000 (for the previous example, the date will become 8/5/2015). +

    Entering hours

    Although the Java applet graph updates as you + enter hours, this information is not saved in the database until you click + Save.

    Deleting a project, group, or category

    A project or category + cannot be deleted if hours have been entered which reference it. You can + make a project inactive, which will prevent it from appearing in reports. + Groups can be only be deleted if they have no members. Put everyone in + the group you'd like to delete in different groups, then delete the group. +

    Screen not displaying properly

    Try resizing your browser or reloading + the page.

    I typed in a URL and it loaded the hours entry screen instead

    + You do not have the privileges to see the page you requested, or you attempted + to view a page which was not intended to be accessed directly. You should + be able to use every feature of the application from the button bar or + links within the pages. If you're interested in looking at the source code, + use an external viewer.

    I entered comments with my hours, but they're + not showing up in the report

    Comments are printed only for the show + all entries reports. For all other reports, each line may be representing + multiple entries. +


    How This Application Works

    +

    General

    Project variables

    Tock uses project variables + to minimize the number of database lookups which must be performed. Because + the project variables are available to all users of the application, they + only need to be set once, and reset as needed. Tock stores lists of work + types, projects, groups, and employees. Pages which use these values call + load functions to set these variables if they have not been set already. +

    Access control

    The application uses LiveWire's client cookies + to maintain state. This means that until the user's cookies expire, she + or he will be recognized by the system and won't have to enter a user name + and password every time. A logout function erases these cookies so that + another person can use the same machine to access the application using + her own login. This is also useful to prevent access after leaving the + machine unattended. +

    Tock also stores a number of useful data items using client cookies. + These cookies are used to store items such as the user's id, login name, + full name, default project, default category, list of active projects, + and the page the user came from. +

    In addition to cookies, Tock uses a simple security scheme to verify + that the user has actually passed through the login screens. This consists + of setting a cookie whose name is determined at login time, and then checking + whether this cookie is set before displaying a page. +

    Some pages in this application should never be accessed directly, such + as pages that perform database actions based on form input. In order to + access one of these pages, the prevPage cookie must be set to the correct + value. The only way to set this value correctly is to click submit on the + page which provides the form input for the page. This prevents users from + typing in URLs and seeing pages they shouldn't. +

    On each page, the function checkPrevPage is called with the name of + the current page. This function +

      +
    • checks whether there is a connection to the database +
    • verifies that the user has logged in correctly +
    • if a page has a prerequisite, checks that the user is coming from the + correct page using the prevPage cookie +
    +

    If any of these checks fail, the user is redirected to the login screen. + If the user is logged in, s/he will go directly to the enter hours screen. + If all checks succeed, the prevPage cookie is set to the current page and + processing continues. +

    A similar process is used to check a user's admin status before displaying + pages that only admins should be able to see. The function lookupAdminStatus + performs a database query to determine whether a user has admin privileges. +

    Input validation

    Tock uses Java Script extensively to validate + user input and provide immediate feedback. This prevents having to switch + back and forth between the form screen and an error screen, trying to determine + what went wrong. Java Script is used to ensure that dates are valid, date + ranges make sense, fields are not too long for the database, all necessary + selections have been made, and that database constraints are enforced. +

    Database interaction

    Tock uses Live Wire's database connectivity + in every aspect of its functionality. The data users enter on the hours + entry screen is saved to the database, where it is immediately available + for producing reports. The reports retrieve information from the database + and present it in a variety of views so that it is useful to the user. + User preference information is stored in the database and used to customize + the application on the fly for each user. The admin section provides an + easy to use way to administer the Tock database. +

    Hours Entry

    The hours entry screen uses a form to collect information + about the date, project, category, and number of hours a user has worked, + and stores this information in the database. +

    The hours entry screen contains a Java applet which graphs a user's + hours based on entries in the database. It also takes advantage of Live + Connect to update the graph every time the user enters hours on the form. + The date field, hours, and hours fraction fields all have onChange event + handlers which determine if the graph should be updated, and if so, call + a Java method to instantly change the graph. +

    The date field uses a Java Script function to ensure that the user has + entered a valid date. A warning pops up if the date is not valid. +

    The list of projects each user sees is determined at page generation + time from the user's list of active projects in the database. This list + can be changed at any time using the preferences screen. Any projects which + are made inactive will not appear in the list. +

    If a user attempts to enter more than 24 hours for a single day this + week, a warning pops up and the hours for the entry are reset. For hours + outside this week, the user cannot enter more than 24 hours on the form. + As the hours entries are inserted into the database, each entry is checked + to see whether it puts the user over 24 hours for a day. If so, the hours + for that are set to 0, all other information is retained, and the user + is warned and asked to edit the entries for that day. +

    Comments have a maximum length of 250 characters. If the user types + a comment longer than this, the user has the option of truncating the comment + or editing it to be under 250 characters. +

    Reports

    The reports screen is a form which allows the user + to define a view of the hours data. The form input is used to construct + database queries. The results of these queries are formatted using Java + Script functions. This methodology should be easily extensible should a + developer which to add new types of reports, since s/he would need only + to construct a new query and could use the existing functions to format + and display the report. +

    The reports screen uses Java Script to ensure that the date range entered + by the user is valid and that the user has selected an item from the select + list for they type of report s/he wants to generate. The radio button next + to each select list is checked automatically using the onChange event handler + when the user selects an item from the select list. +

    Preferences

    The preferences screen is where users can change + their vital data, current active projects, and defaults. +

    The preferences screen uses Java Script functions to ensure that all + entries are valid and that a user's default project is also one of her/his + active projects. Clicking save changes causes the information to be updated + in the database and forces a reload of the user's preference information. +

    Admin

    The admin section uses forms to allow users to perform + a variety of functions. This section of the application can only be accessed + by users who have admin privileges. +

    The admin screen uses Java Script to ensure that a user has chosen an + item to edit before clicking the submit button. Each of the screens in + the admin interface also uses Java Script to validate user input. For groups, + projects, and work types, a Java Script function called when the user clicks + Save checks that the name of the item is not already being used. Names + are also checked for length limits and illegal characters. +

    A delete button is only displayed if the item can be deleted without + violating database integrity constraints. This is determined as the page + is generated by querying the database about the existence of items which + would prevent a legal delete. +

    After adding or editing an item, the default status line message is + set to a message reflecting the change with the onLoad event handler. The + onUnload event handler is used to turn the message off once the user leaves + the page. +

    Database Schema

    +

      +

    +
    category table +
    unique ids and names of types of work +
    group table +
    unique ids and names of groups +
    group_people table +
    user ids and group ids which specify group affiliations for users +
    hours table +
    hours entries: date, user, number of hours, project, category, and + description +
    project table +
    unique ids, names, active status, and billable status of projects +
    user table +
    user information: id, login, password, name, title, phone, email, active + status, full/part time status, admin privileges, default project and default + category +
    user_projects table +
    user ids and project isd which specify the active projects for users +
    +

      +

+ +

Soporte técnico y servicios.

+ +
    +

     
    +
+ + diff --git a/home.html b/home.html new file mode 100644 index 0000000..eecf1aa --- /dev/null +++ b/home.html @@ -0,0 +1,78 @@ + + + + Cuentas a Pagar (SANDO) + + + + + + +
 
+ +
+ + + + + + + +
+
+ +

+

+ +
+ + + +
Dpto. +Cuentas a Pagar
+ +



+
+

+ +
+ + + +
+
+
+ +

+


+ +
+ + + + + +
+
Construcciones +SANDO SA
+ +
Departamento +de Cuentas a Pagar
+
+
Last modified: 5/2/97
+
+
c/ José Ortega y Gasset +194-196
+ +
29006 MALAGA
+ +
Tfno: 34 - 5 -232 20 00
+ +
Fax : 34 - 5 - 234 75 48
+
+ + + diff --git a/initial.html b/initial.html new file mode 100644 index 0000000..ebf7434 --- /dev/null +++ b/initial.html @@ -0,0 +1,128 @@ + + + + Inicio + + + + + + + +

+ + + + + + + + + +chkBrowser(); + +client.prevPage = "initial.html"; +client.es_inicio = 1; +dbConnect(); + +if (!request.ipw && client.username != "null" && client.username != null) { +// if (!loggedIn()) +// redirect("logout.html"); +// else +// if (request.err) +// redirect("multi_entry.html"); +// else + redirect("ctasapagar.html?FrameType="+request.FrameType); +} +if (request.err) + redirect("logged_out.html"); +

+ +
+ +
+
Construcciones SANDO +  
+
+

Departamento de Cuentas a Pagar

+ + +"); + } + + +
+ + +"); + + + + +"); + + + + + +
+
+
+
+ + + + if (request.ipw) { + writeln("
El nombre de usuario o el password
es incorrecto.

USER

+ + if (client.username != "null" && client.username != null) + writeln(" "); + else + writeln(" "); + +
+ + if (request.ipw) + writeln("
Por favor Intentar otra vez.

PASSWORD

+ + if (request.ipw) + writeln("
 
+ +
+
+

+ +

Estructura Página:Completa + Lateral + Cabecera +
 

+
Visualizar Descripciones de Claves:Si + No +

+
Visualizar Mensaje:Si + No +

+
 
+
+writeSignature(true); +
Last modified: 27/2/97 
+ + diff --git a/l_albaran.html b/l_albaran.html new file mode 100644 index 0000000..f9f7b64 --- /dev/null +++ b/l_albaran.html @@ -0,0 +1,368 @@ + + + +Listado de albaranes + + + + + +var NF6="" +var NF8="" +var NF9="" +var NF10="" +var HOY=new Date(); +// Algunos formatos para fechas. +var NLDF=""; // para columnas en las queries INFORMIX +var nprinter=""; +var spoolpath=""; +var baseHtml=""; +var textoReqs=""; +var nomFile="c:/tmprpts/empty"; +fileRpt=new File(nomFile); +fileRpt.close(); +var PaperVLines=76// Nro. Lins. del Papel A4 Vertical FONT Default +var PaperHLines=52// Nro. Lins. del Papel A4 Horizontal FONT Default +dbAcl(); +if (request.gofunc) + writeln(' '); +writeln(''); +writeln(''); +writeln(''); +writeln("'); +if( request.f_orden) { + if (!request.gofunc) { + dbConnect(); + if (request.desde && request.hasta) { + var desde_fecha=DateFormat(request.desde,NLDF); + if ( desde_fecha.substring(0,1) == "-" ) + redirect("alertpage.html?alert=3"); + var hasta_fecha=DateFormat(request.hasta,NLDF); + if ( hasta_fecha.substring(0,1) == "-" ) + redirect("alertpage.html?alert=3"); + c_albaranes = database.cursor("SELECT * FROM albaranes,proveedores WHERE albaranes.nif=proveedores.nif and "+ client.criteria +" Between '" + + desde_fecha + "' and '"+ hasta_fecha + "' ORDER BY " + client.criteria); + } + else if (request.search1) { + c_albaranes = database.cursor("SELECT * FROM albaranes,proveedores WHERE albaranes.nif=proveedores.nif and "+ client.criteria +" MATCHES '" + + request.search1 + "' ORDER BY " + client.criteria); + } + else if (request.f_orden) { + 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 >= '"+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 <= '"+f_hasta+"' " + } + if ( request.h_cod_centro.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" albaranes.cod_centro >= '"+request.d_cod_centro+"' and albaranes.cod_centro <= '"+request.h_cod_centro+"' " + } else { + if ( request.d_cod_centro.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" albaranes.cod_centro matches '"+request.d_cod_centro+"'" + } + } + if ( request.nif.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" albaranes.nif matches '"+request.nif+"'" + } + if ( request.h_nro_fra.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" albaranes.fra_reg >= '"+request.d_nro_fra+"' and albaranes.nro_fra <= '"+request.h_nro_fra+"'" + } else { + if ( request.d_nro_fra.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" albaranes.fra_reg >= '"+request.d_nro_fra+"'" + } + } + if ( request.h_nro_reg.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" albaranes.nro_reg >= '"+StringClip(true,request.d_nro_reg)+"' and albaranes.nro_reg <= '"+StringClip(true,request.h_nro_reg)+"'" + } else { + if ( request.d_nro_reg.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" albaranes.nro_reg >= '"+StringClip(true,request.d_nro_reg)+"'" + } + } + 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 (request.f_formato=="proveedor") + request.f_orden=" albaranes.nif,"+request.f_orden; + if (request.f_formato=="centro") + request.f_orden=" albaranes.cod_centro,razon_social,"+request.f_orden; + if (request.f_formato=="pendientes") { + request.f_orden=" albaranes.cod_centro,razon_social,"+request.f_orden; + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+"fra_reg matches ' *' " + } + if (request.f_formato=="emitidas") { + request.f_orden=""+request.f_orden; + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+"fecha_emision is not null " + } + if (request.f_formato=="provBloq") + request.f_orden=" albaranes.nif,"+request.f_orden; +// if (request.f_formato=="documento") +// request.f_orden=" albaranes.nif,"+request.f_orden; + if (criterio.length > 0 ) + criterio=" and "+criterio; + c_albareg = database.cursor("SELECT * FROM albaranes,proveedores,centros WHERE albaranes.nif=proveedores.nif and albaranes.cod_centro=centros.cod_centro"+ criterio + + " ORDER BY " + request.f_orden); + } + if (!c_albareg) + DbsError(false,-1); + else { + report_alb(); + writeln(""); + c_albareg.close(); + } + } +} +criterio="Listado"; +writeln("'); +if ( request.FrameType == "F" || request.FrameType == "T" ) { + writeln(""); +} +if (!request.waux) { + if (request.gofunc) { + writeln(''); + writeln(''); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + diff --git a/l_factura.html b/l_factura.html new file mode 100644 index 0000000..33a099c --- /dev/null +++ b/l_factura.html @@ -0,0 +1,419 @@ + + + +Listado de facturas + + + + + + +var NF6="" +var NF8="" +var NF9="" +var NF10="" +var HOY=new Date(); +var nlin=0; +// Algunos formatos para fechas. +var NLDF=""; // para columnas en las queries INFORMIX +var nprinter=""; +var spoolpath=""; +var baseHtml=""; +var textoReqs=""; +var nomFile="c:/tmprpts/empty"; +fileRpt=new File(nomFile); +fileRpt.close(); +var PaperVLines=76// Nro. Lins. del Papel A4 Vertical FONT Default +var PaperHLines=52// Nro. Lins. del Papel A4 Horizontal FONT Default +dbAcl(); +if (request.gofunc) + writeln(' '); +writeln("'); +if( request.f_orden) { + if (!request.gofunc) { + dbConnect(); + if (request.desde && request.hasta) { + var desde_fecha=DateFormat(request.desde,NLDF); + if ( desde_fecha.substring(0,1) == "-" ) + redirect("alertpage.html?alert=3"); + var hasta_fecha=DateFormat(request.hasta,NLDF); + if ( hasta_fecha.substring(0,1) == "-" ) + redirect("alertpage.html?alert=3"); + c_facturas = database.cursor("SELECT * FROM facturas,proveedores WHERE facturas.nif=proveedores.nif and "+ client.criteria +" Between '" + + desde_fecha + "' and '"+ hasta_fecha + "' ORDER BY " + client.criteria); + } + else if (request.search1) { + c_facturas = database.cursor("SELECT * FROM facturas,proveedores WHERE facturas.nif=proveedores.nif and "+ client.criteria +" MATCHES '" + + request.search1 + "' ORDER BY " + client.criteria); + } + else if (request.f_orden) { + 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 >= '"+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 <= '"+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+" vto_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+" vto_pago <= '"+v_hasta+"' " + } + if ( request.h_cod_centro.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" facturas.cod_centro >= '"+request.d_cod_centro+"' and facturas.cod_centro <= '"+request.h_cod_centro+"' " + } else { + if ( request.d_cod_centro.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" facturas.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 matches '"+request.d_nro_fra+"'" + } + } + 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_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 matches '"+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 (request.f_formato=="proveedor") + request.f_orden=" facturas.nif,"+request.f_orden; + if (request.f_formato=="centro") + request.f_orden=" facturas.cod_centro,razon_social,"+request.f_orden; + if (request.f_formato=="pendientes") + request.f_orden=" facturas.f_recepcion,"+request.f_orden; + if (request.f_formato=="emitidas") { + request.f_orden=" facturas.cod_banco,facturas.vto_pago,"+request.f_orden; + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+"f_emision_pago is not null " + } + if (request.f_formato=="provBloq") + request.f_orden=" facturas.nif,"+request.f_orden; +// if (request.f_formato=="documento") +// request.f_orden=" facturas.nif,"+request.f_orden; + if (criterio.length > 0 ) + criterio=" and "+criterio; + c_factreg = database.cursor("SELECT * FROM facturas,proveedores,centros WHERE facturas.nif=proveedores.nif and facturas.cod_centro=centros.cod_centro"+ criterio + + " ORDER BY " + request.f_orden); + } + if (!c_factreg) + DbsError(false,-1); + else { + report_fra(); + writeln(""); + c_factreg.close(); + } + } +} +criterio="Listado"; +writeln("'); +if ( request.FrameType == "F" || request.FrameType == "T" ) { + writeln(""); +} +if (!request.waux) { + if (request.gofunc) { + writeln(''); + writeln(''); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + diff --git a/l_pedido.html b/l_pedido.html new file mode 100644 index 0000000..0c4f28e --- /dev/null +++ b/l_pedido.html @@ -0,0 +1,414 @@ + + + +Listado de pedidos + + + + + +var NF6="" +var NF8="" +var NF9="" +var NF10="" +var HOY=new Date(); +// Algunos formatos para fechas. +var NLDF=""; // para columnas en las queries INFORMIX +var baseHtml=""; +var PaperVLines=76// Nro. Lins. del Papel A4 Vertical FONT Default +var PaperHLines=52// Nro. Lins. del Papel A4 Horizontal FONT Default +dbAcl(); +if (request.gofunc) + writeln(' '); +writeln(''); +writeln(''); +writeln(''); +writeln("'); +if( request.f_orden) { + if (!request.gofunc) { + dbConnect(); + if (request.desde && request.hasta) { + var desde_fecha=DateFormat(request.desde,NLDF); + if ( desde_fecha.substring(0,1) == "-" ) + redirect("alertpage.html?alert=3"); + var hasta_fecha=DateFormat(request.hasta,NLDF); + if ( hasta_fecha.substring(0,1) == "-" ) + redirect("alertpage.html?alert=3"); + c_pedidos = database.cursor("SELECT * FROM pedidos,proveedores WHERE pedidos.nif=proveedores.nif and "+ client.criteria +" Between '" + + desde_fecha + "' and '"+ hasta_fecha + "' ORDER BY " + client.criteria); + } + else if (request.search1) { + c_pedidos = database.cursor("SELECT * FROM pedidos,proveedores WHERE pedidos.nif=proveedores.nif and "+ client.criteria +" MATCHES '" + + request.search1 + "' ORDER BY " + client.criteria); + } + else if (request.f_orden) { + 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 >= '"+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 <= '"+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+" vto_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+" vto_pago <= '"+v_hasta+"' " + } + if ( request.h_cod_centro.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" pedidos.cod_centro >= '"+request.d_cod_centro+"' and pedidos.cod_centro <= '"+request.h_cod_centro+"' " + } else { + if ( request.d_cod_centro.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" pedidos.cod_centro matches '"+request.d_cod_centro+"'" + } + } + if ( request.nif.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" pedidos.nif matches '"+request.nif+"'" + } + if ( request.h_nro_fra.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" pedidos.nro_fra >= '"+request.d_nro_fra+"' and pedidos.nro_fra <= '"+request.h_nro_fra+"'" + } else { + if ( request.d_nro_fra.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" pedidos.nro_fra >= '"+request.d_nro_fra+"'" + } + } + if ( request.h_mes_fra.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" pedidos.mes >= '"+request.d_mes_fra+"' and pedidos.mes <= '"+request.h_mes_fra+"'" + } else { + if ( request.d_mes_fra.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" pedidos.mes >= '"+request.d_mes_fra+"'" + } + } + if ( request.h_nro_regn.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" pedidos.nro_reg >= '"+StringClip(true,request.d_nro_regy)+StringClip(true,request.d_nro_regn)+"' and pedidos.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+" pedidos.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 (request.f_formato=="proveedor") + request.f_orden=" pedidos.nif,"+request.f_orden; + if (request.f_formato=="centro") + request.f_orden=" pedidos.cod_centro,razon_social,"+request.f_orden; + if (request.f_formato=="pendientes") + request.f_orden=" pedidos.f_recepcion,"+request.f_orden; + if (request.f_formato=="emitidas") { + request.f_orden=" pedidos.cod_banco,pedidos.vto_pago,"+request.f_orden; + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+"f_emision_pago is not null " + } + if (request.f_formato=="provBloq") + request.f_orden=" pedidos.nif,"+request.f_orden; +// if (request.f_formato=="documento") +// request.f_orden=" pedidos.nif,"+request.f_orden; + if (criterio.length > 0 ) + criterio=" and "+criterio; + c_factreg = database.cursor("SELECT * FROM pedidos,proveedores,centros WHERE pedidos.nif=proveedores.nif and pedidos.cod_centro=centros.cod_centro"+ criterio + + " ORDER BY " + request.f_orden); + } + if (!c_factreg) + DbsError(false,-1); + else { + writeln(""); + c_factreg.close(); + } + } +} +criterio="Listado"; +writeln("'); +if ( request.FrameType == "F" || request.FrameType == "T" ) { + writeln(""); +} +if (!request.waux) { + if (request.gofunc) { + writeln(''); + writeln(''); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + diff --git a/l_prevision.html b/l_prevision.html new file mode 100644 index 0000000..2f7eb27 --- /dev/null +++ b/l_prevision.html @@ -0,0 +1,160 @@ + + + +Listado de facturas + + + + + +var NF9="" +var NF10="" +var NF11="" +var HOY=new Date(); +var nlin=0; +// Algunos formatos para fechas. +var NLDF=""; // para columnas en las queries INFORMIX +var baseHtml=""; +var pathFile="c:/tmprpts/"; +var urlDoc="file:///C|/tmprpts/prevision.html" // Donde leen los Clients +var nprinter=""; +var spoolpath=""; +var baseHtml=""; +var textoReqs=""; +var nomFile="c:/tmprpts/prevision.html"; +var PaperVLines=76// Nro. Lins. del Papel A4 Vertical FONT Default +var PaperHLines=52// Nro. Lins. del Papel A4 Horizontal FONT Default +criterio=""; +dbAcl(); +if (request.gofunc) + writeln(' '); +writeln("'); +if (request.f_entrada) { + if (!request.gofunc) { + dbConnect(); + report_prev(); + writeln(""); + } +} +if ( request.FrameType == "F" || request.FrameType == "T" ) { + writeln(""); +} +if (!request.waux) { + if (request.gofunc) { + writeln(''); + writeln(''); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + diff --git a/l_proveedor.html b/l_proveedor.html new file mode 100644 index 0000000..0b9305c --- /dev/null +++ b/l_proveedor.html @@ -0,0 +1,414 @@ + + + +Listado de proveedores + + + + + +var NF6="" +var NF8="" +var NF9="" +var NF10="" +var HOY=new Date(); +// Algunos formatos para fechas. +var NLDF=""; // para columnas en las queries INFORMIX +var baseHtml=""; +var PaperVLines=76// Nro. Lins. del Papel A4 Vertical FONT Default +var PaperHLines=52// Nro. Lins. del Papel A4 Horizontal FONT Default +dbAcl(); +if (request.gofunc) + writeln(' '); +writeln(''); +writeln(''); +writeln(''); +writeln("'); +if( request.f_orden) { + if (!request.gofunc) { + dbConnect(); + if (request.desde && request.hasta) { + var desde_fecha=DateFormat(request.desde,NLDF); + if ( desde_fecha.substring(0,1) == "-" ) + redirect("alertpage.html?alert=3"); + var hasta_fecha=DateFormat(request.hasta,NLDF); + if ( hasta_fecha.substring(0,1) == "-" ) + redirect("alertpage.html?alert=3"); + c_proveedores = database.cursor("SELECT * FROM proveedores,proveedores WHERE proveedores.nif=proveedores.nif and "+ client.criteria +" Between '" + + desde_fecha + "' and '"+ hasta_fecha + "' ORDER BY " + client.criteria); + } + else if (request.search1) { + c_proveedores = database.cursor("SELECT * FROM proveedores,proveedores WHERE proveedores.nif=proveedores.nif and "+ client.criteria +" MATCHES '" + + request.search1 + "' ORDER BY " + client.criteria); + } + else if (request.f_orden) { + 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 >= '"+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 <= '"+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+" vto_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+" vto_pago <= '"+v_hasta+"' " + } + if ( request.h_cod_centro.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" proveedores.cod_centro >= '"+request.d_cod_centro+"' and proveedores.cod_centro <= '"+request.h_cod_centro+"' " + } else { + if ( request.d_cod_centro.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" proveedores.cod_centro matches '"+request.d_cod_centro+"'" + } + } + if ( request.nif.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" proveedores.nif matches '"+request.nif+"'" + } + if ( request.h_nro_fra.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" proveedores.nro_fra >= '"+request.d_nro_fra+"' and proveedores.nro_fra <= '"+request.h_nro_fra+"'" + } else { + if ( request.d_nro_fra.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" proveedores.nro_fra >= '"+request.d_nro_fra+"'" + } + } + if ( request.h_mes_fra.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" proveedores.mes >= '"+request.d_mes_fra+"' and proveedores.mes <= '"+request.h_mes_fra+"'" + } else { + if ( request.d_mes_fra.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" proveedores.mes >= '"+request.d_mes_fra+"'" + } + } + if ( request.h_nro_regn.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" proveedores.nro_reg >= '"+StringClip(true,request.d_nro_regy)+StringClip(true,request.d_nro_regn)+"' and proveedores.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+" proveedores.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 (request.f_formato=="proveedor") + request.f_orden=" proveedores.nif,"+request.f_orden; + if (request.f_formato=="centro") + request.f_orden=" proveedores.cod_centro,razon_social,"+request.f_orden; + if (request.f_formato=="pendientes") + request.f_orden=" proveedores.f_recepcion,"+request.f_orden; + if (request.f_formato=="emitidas") { + request.f_orden=" proveedores.cod_banco,proveedores.vto_pago,"+request.f_orden; + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+"f_emision_pago is not null " + } + if (request.f_formato=="provBloq") + request.f_orden=" proveedores.nif,"+request.f_orden; +// if (request.f_formato=="documento") +// request.f_orden=" proveedores.nif,"+request.f_orden; + if (criterio.length > 0 ) + criterio=" and "+criterio; + c_factreg = database.cursor("SELECT * FROM proveedores,proveedores,centros WHERE proveedores.nif=proveedores.nif and proveedores.cod_centro=centros.cod_centro"+ criterio + + " ORDER BY " + request.f_orden); + } + if (!c_factreg) + DbsError(false,-1); + else { + writeln(""); + c_factreg.close(); + } + } +} +criterio="Listado"; +writeln("'); +if ( request.FrameType == "F" || request.FrameType == "T" ) { + writeln(""); +} +if (!request.waux) { + if (request.gofunc) { + writeln(''); + writeln(''); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + diff --git a/logged_out.html b/logged_out.html new file mode 100644 index 0000000..5117419 --- /dev/null +++ b/logged_out.html @@ -0,0 +1,45 @@ + + + + Logged Out + + + + +


+
+ + if (request.alert) { + if (request.alert == 0 ) + writeln('

¡¡¡ Acceso No Permitido a los Datos !!!!

'); + } + + +

+ +
+ + + +
+
+
Construcciones Sando + 
+
+
+ +

Cuentas a Pagar

+ +


+
+ 

+ +

Debe Alojarse +en el sistema de nuevo.

+ +
 
+ +
+ + + diff --git a/login.html b/login.html new file mode 100644 index 0000000..f61e131 --- /dev/null +++ b/login.html @@ -0,0 +1,80 @@ + + + + Login + + + + + + + +

+ + + + + + + + + + + + +var baseHtml=""; +if (request.prevPage) + client.prevPage = request.prevPage; + checkPrevPage("login.html"); + +//client.ViewFkey=request.ViewFkey; +//client.FrameType=request.FrameType; +client.MsgScroll=request.MsgScroll; + +login = database.cursor("select id,firstname,lastname,def_category,acl from user where "+ + "active='Y' and login='"+escQuote(request.username)+ + "' and password='"+escQuote(request.password)+"'"); +firstname = null; +lastname = null; +user_found = false; + +request.uid=0; +if (login.next()) { + client.id = login.id; + request.uid= client.id; + firstname = login.firstname; + lastname = login.lastname; + client.username = login.username; + client.fullname = login.fullname; + client.def_category=login.def_category; + client.acl = login.acl; + client.def_project = login.def_project; + client.objeto=""; + client.trans=false; + setLoggedIn(); + user_found = true; +} +login.close(); + + +client.username = request.username; +client.fullname = firstname+" "+lastname; +LoadParametros(); + + +if (!user_found) + redirect("initial.html?ipw=1"); +else { + + baseHtml="FrameType="+request.FrameType+"&ViewFkey="+request.ViewFkey+"&uid="+request.uid + redirect("ctasapagar.html?"+baseHtml); +} + + +

+ + + diff --git a/logout.html b/logout.html new file mode 100644 index 0000000..39017c8 --- /dev/null +++ b/logout.html @@ -0,0 +1,75 @@ + + + + + + + + + +/* +*/ + + + +setLoggedOut(); +client.id = null; +client.username = null; +client.prevPage = null; +client.fullname = null; +client.def_category = null; +client.def_project = null; +client.acl=null; +client.FrameType=null; +client.expiration(0); +client.prevPage = "logout.tml"; +client.es_inicio=0; +client.ViewFkey = null; +client.MsgScroll = null; +client.objeto = "" +client.trans=null; +UnLoadParametros(); + + + +if(database.connected) + database.disconnect(); + +//if (request.bb) { +// write("") +// redirect("go_page.html?page=initial.html?ipw=1"); +// from button bar, already cleared frames +// chk_login(); +// redirect("logged_out.html"); +// +//} +//else { +// redirect("logged_out.html"); +//} + + + + + + + + + + + + + + + diff --git a/o_albaran.html b/o_albaran.html new file mode 100644 index 0000000..4e28e4b --- /dev/null +++ b/o_albaran.html @@ -0,0 +1,784 @@ +Albarán Interno + + + + albaranes + + + + + + + + + + +// Variables para el Server + var HOY=new Date(); + var entorno = new entObj(0); +// Algunos formatos para fechas. + var NLDF=""; // para columnas en las queries INFORMIX + var IFDF=""; // para columnas en SQL según DBDATE +// Algunos formatos para nros. + var NF2="" + var NF3="" + var NF4="" + var NF5="" + var NF6="" + var NF7="" + var NF8="" + var NF9="" + var NF10="" + var NF11="" + var NF12="" +var baseHtml=""; +dbAcl(); +//if ((!request.waux && request.lock) || request.nvo ) + LoadParametros(); +writeln(""); +if (request.gofunc) + writeln(' '); +if (request.gofunc) { + writeln(' '); + writeln(' '); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + + diff --git a/o_apunte.html b/o_apunte.html new file mode 100644 index 0000000..c7e2143 --- /dev/null +++ b/o_apunte.html @@ -0,0 +1,445 @@ + + + + Apuntes Contables + + + + +

+ +
+
+ + + + + + + + + + + + + +
Logout

APUNTES CONTABLES 

+Ayuda +
+

+ + + + + + + + + + + +
+
 
+
+
Dpto. +Cuentas a Pagar 
+
+
Código: 
+
+
Fecha: 
+
+ +
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Importe Debe
+
+
Código Debe
+
+
Cuenta Contable Debe
+
+
Cuenta Contable Haber
+
+
Código Haber
+
+
Importe Haber
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
 
+ + + + + + + +
+
TOTAL DEBE : 
+
+
TOTAL HABER: 
+
+ +

+ +

+ + + + + + + + + +
+
Vto. Jefe de Obra: Si No 
+
+
Vto. Jefe Grupo de Obra: Si No 
+
+
Conforme Proveedor: Si No 
+
+ +
+Contactar con: Departamento +de Cuentas a Pagar
+
Copyright © 1997 Construcciones +SANDO SA & AdmiSys +SL
+Rev. 1.0
webteam@admisys.com
+ + + diff --git a/o_banco.html b/o_banco.html new file mode 100644 index 0000000..7a3f59e --- /dev/null +++ b/o_banco.html @@ -0,0 +1,506 @@ +Bancos + + + + cod_banco + + + + + + + + + + +var baseHtml=""; +dbAcl(); +writeln(""); +if (request.gofunc) + writeln(' '); +if (request.gofunc) { + writeln(' '); + writeln(' '); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + + diff --git a/o_centro.html b/o_centro.html new file mode 100644 index 0000000..1f72ac9 --- /dev/null +++ b/o_centro.html @@ -0,0 +1,205 @@ +centros + + + + Centros + + + + + + + + + + +var baseHtml=""; +dbAcl(); +writeln(""); +if (request.gofunc) + writeln(' '); +if (request.gofunc) { + writeln(' '); + writeln(' '); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + diff --git a/o_clave.html b/o_clave.html new file mode 100644 index 0000000..d966f00 --- /dev/null +++ b/o_clave.html @@ -0,0 +1,186 @@ + + + + cod_clave + + + + + + + + + + +var baseHtml=""; +dbAcl(); +writeln(""); +if (request.gofunc) + writeln(' '); +if (request.gofunc) { + writeln(' '); + writeln(' '); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + diff --git a/o_condpago.html b/o_condpago.html new file mode 100644 index 0000000..6d669b2 --- /dev/null +++ b/o_condpago.html @@ -0,0 +1,207 @@ + + + + cond_pago + + + + + + + + + + +var baseHtml=""; +dbAcl(); +writeln(""); +if (request.gofunc) + writeln(' '); +if (request.gofunc) { + writeln(' '); + writeln(' '); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + diff --git a/o_ctascont.html b/o_ctascont.html new file mode 100644 index 0000000..85986c9 --- /dev/null +++ b/o_ctascont.html @@ -0,0 +1,212 @@ + + + + cta_contable + + + + + + + + + + +var baseHtml=""; +dbAcl(); +if ((!request.waux && request.lock) || request.nvo ) + LoadParametros(); +writeln(""); +if (request.gofunc) + writeln(' '); +if (request.gofunc) { + writeln(' '); + writeln(' '); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + diff --git a/o_factura.html b/o_factura.html new file mode 100644 index 0000000..f203a07 --- /dev/null +++ b/o_factura.html @@ -0,0 +1,2034 @@ +Factura + + + + + facturas + + + + + + + + + + +// Variables para el Server +var HOY=new Date(); +var entorno = new entObj(0); +// Algunos formatos para fechas. +var NLDF=""; // para columnas en las queries INFORMIX +var IFDF=""; // para columnas en SQL según DBDATE +// Algunos formatos para nros. +var NF2="" +var NF3="" +var NF4="" +var NF5="" +var NF6="" +var NF7="" +var NF8="" +var NF9="" +var NF10="" +var NF11="" +var NF12="" +var baseHtml=""; +var whitespace=""; +var nprinter=""; +var spoolpath=""; +var textoReqs=""; +var PaperVLines=76// Nro. Lins. del Papel A4 Vertical FONT Default +var PaperHLines=52// Nro. Lins. del Papel A4 Horizontal FONT Default +dbAcl(); +//if ((!request.waux && request.lock) || request.nvo ) + LoadParametros(); +writeln(""); +if (request.gofunc) + writeln(' '); +if (request.gofunc) { + writeln(' '); + writeln(' '); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + diff --git a/o_localidad.html b/o_localidad.html new file mode 100644 index 0000000..c6ff975 --- /dev/null +++ b/o_localidad.html @@ -0,0 +1,186 @@ + + + + cod_localidad + + + + + + + + + + +var baseHtml=""; +dbAcl(); +writeln(""); +if (request.gofunc) + writeln(' '); +if (request.gofunc) { + writeln(' '); + writeln(' '); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + diff --git a/o_parame.html b/o_parame.html new file mode 100644 index 0000000..abbb08b --- /dev/null +++ b/o_parame.html @@ -0,0 +1,473 @@ + + + + id + + + + + + + + + + +// Variables para el Server + var HOY=new Date(); + var entorno = new entObj(0); +// Algunos formatos para fechas. + var NLDF=""; // para columnas en las queries INFORMIX + var IFDF=""; // para columnas en SQL según DBDATE + var baseHtml=""; +dbAcl(); +if ((!request.waux && request.lock) || request.nvo ) + LoadParametros(); +writeln(""); +if (request.gofunc) + writeln(' '); +if (request.gofunc) { + writeln(' '); + writeln(' '); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + diff --git a/o_pedido.html b/o_pedido.html new file mode 100644 index 0000000..39fe92a --- /dev/null +++ b/o_pedido.html @@ -0,0 +1,358 @@ +pedidos + + + + pedidos + + + + + + + + + + +// Variables para el Server +var HOY=new Date(); +var entorno = new entObj(0); +// Algunos formatos para fechas. +var NLDF=""; // para columnas en las queries INFORMIX +var IFDF=""; // para columnas en SQL según DBDATE +// Algunos formatos para nros. +var NF2="" +var NF3="" +var NF4="" +var NF5="" +var NF6="" +var NF7="" +var NF8="" +var NF9="" +var NF10="" +var NF11="" +var NF12="" +var baseHtml=""; +dbAcl(); +if ((!request.waux && request.lock) || request.nvo ) + LoadParametros(); +writeln(""); +if (request.gofunc) + writeln(' '); +if (request.gofunc) { + writeln(' '); + writeln(' '); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + diff --git a/o_proveedor.html b/o_proveedor.html new file mode 100644 index 0000000..1fc7b26 --- /dev/null +++ b/o_proveedor.html @@ -0,0 +1,406 @@ + + + + Proveedores + + + + + + + + + + +var baseHtml=""; +dbAcl(); +if ((!request.waux && request.lock) || request.nvo ) + LoadParametros(); +writeln(""); +if (request.gofunc) + writeln(' '); +if (request.gofunc) { + writeln(' '); + writeln(' '); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + diff --git a/o_unlockfra.html b/o_unlockfra.html new file mode 100644 index 0000000..728d5c0 --- /dev/null +++ b/o_unlockfra.html @@ -0,0 +1,404 @@ + + + +Gestion de facturas + + + + +var NF7="" +var NF9="" +var NF10="" +var HOY=new Date(); +// Algunos formatos para fechas. +var NLDF=""; // para columnas en las queries INFORMIX +var baseHtml=""; +dbAcl(); +if (request.gofunc) + writeln(' '); +writeln(''); +writeln(''); +writeln("'); +if( request.unlock) { + if (!request.gofunc) { + dbConnect(); + if (request.unlock) { + 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 >= '"+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 <= '"+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+" vto_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+" vto_pago <= '"+v_hasta+"' " + } + 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 matches '"+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); + criterio=criterio+"' 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 matches '"+StringClip(true,request.d_nro_regy)+StringClip(true,request.d_nro_regn)+"'" + } + } + if ( request.h_nro_reg_vton.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" facturas.nro_reg_vto >= '"+StringClip(true,request.d_nro_reg_vtoy)+StringClip(true,request.d_nro_reg_vton)+"' and facturas.nro_reg_vto <= '"+StringClip(true,request.h_nro_reg_vtoy)+StringClip(true,request.h_nro_reg_vton)+"'" + } else { + if ( request.d_nro_reg_vton.length > 0 ) { + if (criterio.length > 0 ) + criterio=criterio+" and " + criterio=criterio+" facturas.nro_reg_vto matches '"+StringClip(true,request.d_nro_reg_vtoy)+StringClip(true,request.d_nro_reg_vton)+"'" + } + } + if ( request.pago_delete && request.unlock=="Ejecutar" ) { + client.is_trans=true; + database.beginTransaction(); + status=database.execute("UPDATE facturas SET "+ + " is_locked='N',"+ + " nro_doc_pago='',"+ + " f_emision_pago='',"+ + " cod_localidad='',"+ + " cod_banco='',"+ + " vto_pago=''"+ + " WHERE " + criterio ); + if ( status != 0 ) { + client.is_trans=false; + database.rollbackTransaction(); + redirect(addClient('error.html?alert=9')); + } + DbsError(true,status); + database.commitTransaction(); + } + if ( request.vto_pago_upd && request.unlock=="Ejecutar" && request.vto_pago.length > 0 ) { + client.is_trans=true; + database.beginTransaction(); + status=database.execute("UPDATE facturas SET "+ + " vto_pago='"+ DateFormat(request.vto_pago,NLDF)+"'"+ + " WHERE " + criterio ); + if ( status != 0 ) { + client.is_trans=false; + database.rollbackTransaction(); + redirect(addClient('error.html?alert=9')); + } + DbsError(true,status); + database.commitTransaction(); + } + if ( request.no_lock && request.unlock=="Ejecutar" ) { + status = database.execute("UPDATE facturas set is_locked='N' WHERE "+ criterio ); + } + if ( request.lock_fra && request.unlock=="Ejecutar" ) { + status = database.execute("UPDATE facturas set is_locked='S' WHERE "+ criterio ); + } + if ( request.trasp_gasto && request.unlock=="Ejecutar" ) { + status = database.execute("UPDATE facturas set traspaso_gasto='N' WHERE "+ criterio ); + } + if ( request.trasp_pago && request.unlock=="Ejecutar" ) { + status = database.execute("UPDATE facturas set traspaso_pago='N' WHERE "+ criterio ); + } + if ( request.trasp_vto && request.unlock=="Ejecutar" ) { + status = database.execute("UPDATE facturas set traspaso_vto='N' WHERE "+ criterio ); + } + if ( request.unlock=="Ejecutar" ) + request.unlock="Buscar"; + } + } +} +nombre="Gestión"; +writeln("'); +if ( request.FrameType == "F" || request.FrameType == "T" ) { + writeln(""); +} +if (!request.waux) { + if (request.gofunc) { + writeln(''); + writeln(''); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + diff --git a/o_vto.html b/o_vto.html new file mode 100644 index 0000000..0d6a18a --- /dev/null +++ b/o_vto.html @@ -0,0 +1,492 @@ +Factura + + + + + facturas + + + + + + + + + +// Variables para el Server +var HOY=new Date(); +var entorno = new entObj(0); +var NF11="" +var baseHtml=""; +var whitespace=""; +dbAcl(); +//if ((!request.waux && request.lock) || request.nvo ) + LoadParametros(); +writeln(""); +if (request.gofunc) + writeln(' '); +if (request.gofunc) { + writeln(' '); + writeln(' '); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + diff --git a/o_vtos.html b/o_vtos.html new file mode 100644 index 0000000..18d832d --- /dev/null +++ b/o_vtos.html @@ -0,0 +1,459 @@ +Factura + + + + + facturas + + + + + + + + + +// Variables para el Server +var HOY=new Date(); +var entorno = new entObj(0); +var NF11="" +var baseHtml=""; +var whitespace=""; +dbAcl(); +//if ((!request.waux && request.lock) || request.nvo ) + LoadParametros(); +writeln(""); +if (request.gofunc) + writeln(' '); +if (request.gofunc) { + writeln(' '); + writeln(' '); + writeln(' '); +} +else { + writeln(''); + writeln(''); +} + diff --git a/obras.html b/obras.html new file mode 100644 index 0000000..a3efd41 --- /dev/null +++ b/obras.html @@ -0,0 +1,19 @@ + + + + Página en Obras + + + + + +

+ +

Página en Construcción +

+ +

+

+ + + diff --git a/reinitial.html b/reinitial.html new file mode 100644 index 0000000..43f7dd3 --- /dev/null +++ b/reinitial.html @@ -0,0 +1,127 @@ + + + + Inicio + + + + + + + +

+ + + + + + + + + +/* + $Log: initial.html,v $ + +*/ + +client.prevPage = "rinitial.html"; +client.es_inicio = 1; +dbConnect(); + + +if (!request.ipw && client.username != "null" && client.username != null) { +// if (!loggedIn()) +// redirect("logout.html"); +// else +// if (request.err) +// redirect("multi_entry.html"); +// else + redirect("ctasapagar.html?FrameType="+request.FrameType); +} +if (request.err) + redirect("logged_out.html"); +

+ +
+ +
+
Construcciones SANDO +  
+
+

+Departamento de Cuentas a Pagar +

+ + + +"); + } + + +
+ + +"); + + + + +"); + + + + + +
+

+
 
+ +
+

+
+ + + + if (request.ipw) { + writeln("
El nombre de usuario o el password
es incorrecto.

USER

+ + if (request.username != "null" && request.username != null) + writeln(" "); + else + writeln(" "); + +
+ + if (request.ipw) + writeln("
Por favor Intentar otra vez.

PASSWORD

+ + if (request.ipw) + writeln("
 
+ +
+
+ +writeln(''); +writeln(''); +writeln(''); + + +writeSignature(true); +
Last modified: 27/2/97 
+ + diff --git a/w_auxiliar.html b/w_auxiliar.html new file mode 100644 index 0000000..cec6d4f --- /dev/null +++ b/w_auxiliar.html @@ -0,0 +1,35 @@ + + + + + + + + + + +writeln('Ventana Auxiliar de '+request.titulo+''); + + + +var baseHtml="FrameType="+request.FrameType+"&ViewFkey="+request.ViewFkey+"&uid="+request.uid + if (!request.obj) + redirect("go_back.html") + if (request.clave && request.valor ) { +// redirect('o_'+ request.obj +'.html?waux=2&'+request.clave+'='+request.valor); + writeln(""); + writeln("");0 + writeln(''); + } + else { + writeln(""); + writeln(""); + writeln(''); + } + + + diff --git a/w_auxnavbar.html b/w_auxnavbar.html new file mode 100644 index 0000000..fc5b68a --- /dev/null +++ b/w_auxnavbar.html @@ -0,0 +1,32 @@ + + + + + + + + + + + + +writeln(''); +if (request.waux == 1 ) { + writeln(''); + writeln(''); +} + + + + +
') + writeln(''); + writeln(''); + writeln(''); + writeln('

'+request.titulo+'

+
+ + + diff --git a/wrongbrw.html b/wrongbrw.html new file mode 100644 index 0000000..c3ed593 --- /dev/null +++ b/wrongbrw.html @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + +