This commit is contained in:
2026-08-25 16:48:40 -04:00
9 changed files with 252 additions and 49 deletions
+1 -1
View File
@@ -40,7 +40,7 @@
<Label gridHeight="1" gridWidth="8" name="label2" posX="24" posY="1" text="FECHA FINAL"/> <Label gridHeight="1" gridWidth="8" name="label2" posX="24" posY="1" text="FECHA FINAL"/>
<DateEdit fieldId="16" gridHeight="1" gridWidth="13" name="fech_final" posX="33" posY="1" tabIndex="-1" title="dateedit2" widget="DateEdit"/> <DateEdit fieldId="16" gridHeight="1" gridWidth="13" name="fech_final" posX="33" posY="1" tabIndex="-1" title="dateedit2" widget="DateEdit"/>
<Label gridHeight="1" gridWidth="6" name="label3" posX="47" posY="1" text="ESTADO "/> <Label gridHeight="1" gridWidth="6" name="label3" posX="47" posY="1" text="ESTADO "/>
<ComboBox fieldId="17" gridHeight="1" gridWidth="12" items="ABIERTA, CERRADA" name="estado1" posX="54" posY="1" tabIndex="-1" title="combobox1" widget="ComboBox"> <ComboBox fieldId="17" gridHeight="1" gridWidth="12" items="ABIERTA, CERRADA" name="estado1" notNull="true" posX="54" posY="1" tabIndex="-1" title="combobox1" widget="ComboBox">
<Item lstrtext="false" name="ABIERTA" text="ABIERTA"/> <Item lstrtext="false" name="ABIERTA" text="ABIERTA"/>
<Item lstrtext="false" name="CERRADA" text="CERRADA"/> <Item lstrtext="false" name="CERRADA" text="CERRADA"/>
</ComboBox> </ComboBox>
+72
View File
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ManagedForm databaseName="smarmotech" fileVersion="40100" gstVersion="60003" name="ManagedForm" uid="{50926d70-025d-4be1-a15f-45acbf1b2888}">
<AGSettings>
<DynamicProperties version="4"/>
</AGSettings>
<Record name="record1" uid="{ae577ed1-a849-40c1-a3a8-3df0bfba35f6}">
<RecordField colName="cotizacion_no" fieldIdRef="5" name="cotizacion_no" sqlTabName="formonly" uid="{34fb79d0-ea3c-45e5-bd43-bd2484db0e24}"/>
<RecordField colName="num_oc" fieldIdRef="12" name="num_oc" sqlTabName="formonly" uid="{1b817c74-fb63-4453-9c9e-580cd0ebe8dd}"/>
<RecordField colName="cerrada" fieldIdRef="10" name="cerrada" sqlTabName="formonly" uid="{a0ade89e-f809-4801-83fc-82267e75339d}"/>
<RecordField colName="sec_vend" fieldIdRef="13" name="sec_vend" sqlTabName="formonly" uid="{532f53e9-4b3f-4c15-8919-c4afedd6e638}"/>
<RecordField colName="historico" defaultValue="N" fieldIdRef="0" name="historico" sqlTabName="formonly" uid="{a297c185-81e7-4ae6-8988-2224946811de}"/>
<RecordField colName="fecha" fieldIdRef="11" name="fecha" sqlTabName="formonly" sqlType="DATE" uid="{62430a14-a00f-413f-b6b1-766e90f9315e}"/>
<RecordField colName="tipo_cliente" fieldIdRef="7" name="tipo_cliente" sqlTabName="formonly" uid="{7cf8df86-dc57-4cd8-9b40-6636785559c9}"/>
<RecordField colName="sec_cliente" fieldIdRef="8" name="sec_cliente" sqlTabName="formonly" uid="{c77b4cbf-8ab9-4072-b566-5ce5401f170b}"/>
<RecordField colName="nombre_cliente" fieldIdRef="6" name="nombre_cliente" sqlTabName="formonly" uid="{b775b626-23dd-4f6c-8fda-b729a1e40605}"/>
<RecordField colName="telefono_r" fieldIdRef="9" name="telefono_r" sqlTabName="formonly" uid="{c545bc0e-23c1-465b-9688-5d5039b27597}"/>
<RecordField colName="cod_n" fieldIdRef="1" name="cod_n" sqlTabName="formonly" uid="{a8bcc1fa-5503-4b65-8249-fdaa1e91c258}"/>
<RecordField colName="cod_grupo" fieldIdRef="2" name="cod_grupo" sqlTabName="formonly" uid="{71e68d6d-8151-44c2-a42c-4e9465dd3c2b}"/>
<RecordField colName="cod_tipo" fieldIdRef="3" name="cod_tipo" sqlTabName="formonly" uid="{a5d7c1ab-90d7-4feb-b86d-6a74f1966b44}"/>
<RecordField colName="cod_sec" fieldIdRef="4" name="cod_sec" sqlTabName="formonly" uid="{0fed854c-cd15-4a85-b593-c3a9f114d277}"/>
<RecordField colName="salida" defaultValue="Detallado" fieldIdRef="14" name="salida" sqlTabName="formonly" uid="{72b478e3-81f8-4d24-ad49-d777be1c0608}"/>
<RecordField colName="visualiza" defaultValue="PANTALLA" fieldIdRef="15" name="visualiza" sqlTabName="formonly" uid="{7c7aa938-7433-4dd6-bcc2-c27d6b3e2e34}"/>
</Record>
<Form gridHeight="10" gridWidth="67" name="prfmrp116" text="STATUS ORDENES PEDIDOS">
<ActionDefaultList name="actiondefaultlist1">
<ActionDefault image="print" name="ejecutar" text="Genera Reporte"/>
</ActionDefaultList>
<Grid gridHeight="10" gridWidth="67" name="grid1" posX="0" posY="0">
<Label gridHeight="1" gridWidth="10" name="label1" posX="3" posY="0" text="Cotizacion"/>
<Edit colName="cotizacion_no" comment="Digite un numero de cotizacion o deje en blanco para todas" fieldId="5" gridHeight="1" gridWidth="10" name="cotizacion_no" posX="19" posY="0" sqlTabName="formonly" tabIndex="1" widget="Edit"/>
<Label gridHeight="1" gridWidth="5" name="label2" posX="3" posY="1" text="Orden"/>
<Edit colName="num_oc" comment="Digite un numero de orden o deje en blanco para todas" fieldId="12" gridHeight="1" gridWidth="10" name="num_oc" posX="19" posY="1" sqlTabName="formonly" tabIndex="2" widget="Edit"/>
<Label gridHeight="1" gridWidth="12" name="label3" posX="34" posY="1" text="Status Orden"/>
<ComboBox colName="cerrada" fieldId="10" gridHeight="1" gridWidth="14" items="Cerrada, Abiertas" name="cerrada" notNull="true" posX="47" posY="1" sqlTabName="formonly" tabIndex="3" widget="ComboBox">
<Item name="S" text="Cerrada"/>
<Item name="N" text="Abiertas"/>
</ComboBox>
<Label gridHeight="1" gridWidth="8" name="label4" posX="3" posY="2" text="Vendedor"/>
<Edit colName="sec_vend" comment="Digite un numero de vendedor o deje en blanco para todos" fieldId="13" gridHeight="1" gridWidth="10" name="sec_vend" posX="19" posY="2" sqlTabName="formonly" tabIndex="4" widget="Edit"/>
<RadioGroup colName="historico" defaultValue="N" fieldId="0" gridHeight="1" gridWidth="26" items="HISTORICO, ACTUAL" name="historico" posX="35" posY="2" sqlTabName="formonly" tabIndex="5" widget="RadioGroup">
<Item name="H" text="HISTORICO"/>
<Item name="N" text="ACTUAL"/>
</RadioGroup>
<Label gridHeight="1" gridWidth="5" name="label5" posX="3" posY="3" text="Fecha"/>
<DateEdit colName="fecha" fieldId="11" format="dd/mm/yyyy" gridHeight="1" gridWidth="10" name="fecha" posX="19" posY="3" sqlTabName="formonly" sqlType="DATE" tabIndex="6" widget="DateEdit"/>
<Label gridHeight="1" gridWidth="15" name="label6" posX="3" posY="4" text="Codigo Cliente"/>
<Edit colName="tipo_cliente" fieldId="7" gridHeight="1" gridWidth="3" name="tipo_cliente" posX="19" posY="4" sqlTabName="formonly" tabIndex="7" widget="Edit"/>
<Label gridHeight="1" gridWidth="1" name="label7" posX="23" posY="4" text="-"/>
<Edit colName="sec_cliente" fieldId="8" gridHeight="1" gridWidth="6" name="sec_cliente" posX="25" posY="4" sqlTabName="formonly" tabIndex="8" widget="Edit"/>
<Label gridHeight="1" gridWidth="15" name="label8" posX="3" posY="5" text="Nombre Cliente"/>
<Edit colName="nombre_cliente" comment="Utilice el simbolo (*) para buscar nombres similares al que desea" fieldId="6" gridHeight="1" gridWidth="47" name="nombre_cliente" posX="19" posY="5" sqlTabName="formonly" tabIndex="9" widget="Edit"/>
<Label gridHeight="1" gridWidth="13" name="label9" posX="3" posY="6" text="Telefono Res."/>
<Edit colName="telefono_r" fieldId="9" gridHeight="1" gridWidth="15" name="telefono_r" posX="19" posY="6" sqlTabName="formonly" tabIndex="10" widget="Edit"/>
<Label gridHeight="1" gridWidth="8" name="label10" posX="3" posY="7" text="Producto"/>
<Edit colName="cod_n" fieldId="1" gridHeight="1" gridWidth="5" name="cod_n" posX="19" posY="7" sqlTabName="formonly" tabIndex="11" widget="Edit"/>
<Edit colName="cod_grupo" fieldId="2" gridHeight="1" gridWidth="6" name="cod_grupo" posX="26" posY="7" sqlTabName="formonly" tabIndex="12" widget="Edit"/>
<Edit colName="cod_tipo" fieldId="3" gridHeight="1" gridWidth="6" name="cod_tipo" posX="34" posY="7" sqlTabName="formonly" tabIndex="13" widget="Edit"/>
<Edit colName="cod_sec" fieldId="4" gridHeight="1" gridWidth="7" name="cod_sec" posX="42" posY="7" sqlTabName="formonly" tabIndex="14" widget="Edit"/>
<Label gridHeight="1" gridWidth="15" name="label11" posX="3" posY="8" text="Salida Reporte"/>
<ComboBox colName="salida" defaultValue="Detallado" fieldId="14" gridHeight="1" gridWidth="15" items="Detallado, Resumido" name="salida" posX="19" posY="8" sqlTabName="formonly" tabIndex="15" widget="ComboBox">
<Item name="prprrp116.4rp" text="Detallado"/>
<Item name="prprrp016a.4rp" text="Resumido"/>
</ComboBox>
<Label gridHeight="1" gridWidth="13" name="label12" posX="3" posY="9" text="Visualizacion"/>
<ComboBox colName="visualiza" defaultValue="PANTALLA" fieldId="15" gridHeight="1" gridWidth="15" items="PANTALLA, ACROBAT READER, EXCEL" name="visualiza" posX="19" posY="9" sqlTabName="formonly" tabIndex="16" widget="ComboBox">
<Item name="SVG" text="PANTALLA"/>
<Item name="PDF" text="ACROBAT READER"/>
<Item name="XLSX" text="EXCEL"/>
</ComboBox>
</Grid>
</Form>
</ManagedForm>
+1 -1
View File
@@ -48,7 +48,7 @@ DATEEDIT f1 = formonly.fecha type date,format = "dd/mm/yyyy";
o1 = formonly.num_oc,comments="Digite un numero de orden o deje en blanco para todas"; o1 = formonly.num_oc,comments="Digite un numero de orden o deje en blanco para todas";
v1 = formonly.sec_vend,comments="Digite un numero de vendedor o deje en blanco para todos"; v1 = formonly.sec_vend,comments="Digite un numero de vendedor o deje en blanco para todos";
COMBOBOX s=formonly.salida,ITEMS=(("prprrp116.4rp","Detallado"),("prprrp016a.4rp","Resumido")),default="Detallado"; COMBOBOX s=formonly.salida,ITEMS=(("prprrp116.4rp","Detallado"),("prprrp016a.4rp","Resumido")),default="Detallado";
COMBOBOX v=formonly.visualiza,ITEMS=(("SVG","PANTALLA"),("PDF","ACROBAT READER")),default="PANTALLA"; COMBOBOX v=formonly.visualiza,ITEMS=(("SVG","PANTALLA"),("PDF","ACROBAT READER"),("XLSX","EXCEL")),default="PANTALLA";
instructions instructions
delimiters " " delimiters " "
end end
+3 -1
View File
@@ -71,7 +71,9 @@ DEFINE hoy DATE
END INPUT END INPUT
CONSTRUCT BY NAME criterio ON a.tipo_cliente,a.sec_cliente, CONSTRUCT BY NAME criterio ON a.tipo_cliente,a.sec_cliente,
a.num_oc,a.fecha a.num_oc,a.fecha_oc
FROM tipo_cliente,sec_cliente,
num_oc,fecha
AFTER CONSTRUCT AFTER CONSTRUCT
IF tipo_orden = 'N' THEN IF tipo_orden = 'N' THEN
+58 -23
View File
@@ -79,6 +79,8 @@ FUNCTION prprrp016()
END RECORD, END RECORD,
salida,visualiza CHAR(20) salida,visualiza CHAR(20)
DEFINE hay_datos SMALLINT
OPTIONS OPTIONS
PROMPT LINE 23, PROMPT LINE 23,
FORM LINE 8, FORM LINE 8,
@@ -205,6 +207,40 @@ FUNCTION prprrp016()
PREPARE comando FROM selec PREPARE comando FROM selec
DECLARE busca CURSOR FOR comando DECLARE busca CURSOR FOR comando
-- Verifica primero si hay registros: si el reporte se inicia sin filas,
-- el motor de reportes falla al no poder resolver p_compania.nombre
-- (variable "look ahead" del encabezado) porque nunca se llega a imprimir nada.
OPEN busca
FETCH busca INTO busqueda.cotizacion_no,busqueda.fecha,busqueda.tipo_cliente,
busqueda.sec_cliente,busqueda.nombre_proyecto,busqueda.direccion_proyecto,
busqueda.telefono_r,busqueda.nombre,busqueda.num_oc,busqueda.fecha_oc,
busqueda.fecha_entrega,busqueda.fecha_cierre,busqueda.cod_n,
busqueda.cod_grupo,busqueda.cod_tipo,busqueda.cod_sec,
busqueda.descrip_esp,busqueda.unidad_med,busqueda.cantidad,
busqueda.precio,busqueda.cantidad_2,busqueda.cod_mov,
busqueda.fecha_doc,busqueda.documento,busqueda.status_mov,
busqueda.simbolo,busqueda.vendedor,busqueda.monto_cotizacion,
busqueda.condicion,busqueda.estado_orden,busqueda.telefono,
busqueda.celular,busqueda.email,busqueda.contacto
IF STATUS = NOTFOUND THEN
CALL fgl_winmessage("WARNING","NO EXISTEN REGISTROS CON ESA CONDICION","SOP")
LET hay_datos = FALSE
ELSE
LET hay_datos = TRUE
END IF
# El formulario solo guarda el texto visible del combo (no el valor interno
# que tenia el .per original), asi que aqui se traduce de vuelta.
CASE salida CLIPPED
WHEN "Detallado" LET salida = "prprrp116.4rp"
WHEN "Resumido" LET salida = "prprrp016a.4rp"
END CASE
CASE visualiza CLIPPED
WHEN "PANTALLA" LET visualiza = "SVG"
WHEN "ACROBAT READER" LET visualiza = "PDF"
WHEN "EXCEL" LET visualiza = "XLSX"
END CASE
LET r_filename = salida CLIPPED LET r_filename = salida CLIPPED
IF fgl_report_loadCurrentSettings(r_filename) THEN -- load the .4rp file IF fgl_report_loadCurrentSettings(r_filename) THEN -- load the .4rp file
@@ -216,30 +252,13 @@ FUNCTION prprrp016()
END IF END IF
IF handler IS NOT NULL THEN -- report engine was configured ok IF handler IS NOT NULL AND hay_datos THEN -- report engine was configured ok and there is data to print
START REPORT reporte_16 TO XML HANDLER handler START REPORT reporte_16 TO XML HANDLER handler
-- La primera fila ya fue leida arriba (para saber si hay_datos); aqui se
-- procesa esa fila y se sigue con FETCH manual hasta agotar el cursor.
FOREACH busca INTO busqueda.cotizacion_no,busqueda.fecha,busqueda.tipo_cliente, WHILE hay_datos
busqueda.sec_cliente,busqueda.nombre_proyecto,busqueda.direccion_proyecto,
busqueda.telefono_r,busqueda.nombre,busqueda.num_oc,busqueda.fecha_oc,
busqueda.fecha_entrega,busqueda.fecha_cierre,busqueda.cod_n,
busqueda.cod_grupo,busqueda.cod_tipo,busqueda.cod_sec,
busqueda.descrip_esp,busqueda.unidad_med,busqueda.cantidad,
busqueda.precio,busqueda.cantidad_2,busqueda.cod_mov,
busqueda.fecha_doc,busqueda.documento,busqueda.status_mov,
busqueda.simbolo,busqueda.vendedor,busqueda.monto_cotizacion,
busqueda.condicion,busqueda.estado_orden,busqueda.telefono,
busqueda.celular,busqueda.email,busqueda.contacto
IF STATUS = NOTFOUND THEN
CALL fgl_winmessage("WARNING","NO EXISTEN REGISTROS CON ESA CONDICION","SOP")
EXIT FOREACH
END IF
IF busqueda.cantidad_2 IS NULL THEN IF busqueda.cantidad_2 IS NULL THEN
LET busqueda.cantidad_2 = 0 LET busqueda.cantidad_2 = 0
END IF END IF
@@ -268,9 +287,25 @@ IF handler IS NOT NULL THEN -- report engine was configured ok
END IF END IF
OUTPUT TO REPORT reporte_16(busqueda.*) OUTPUT TO REPORT reporte_16(busqueda.*)
END FOREACH
FETCH busca INTO busqueda.cotizacion_no,busqueda.fecha,busqueda.tipo_cliente,
busqueda.sec_cliente,busqueda.nombre_proyecto,busqueda.direccion_proyecto,
busqueda.telefono_r,busqueda.nombre,busqueda.num_oc,busqueda.fecha_oc,
busqueda.fecha_entrega,busqueda.fecha_cierre,busqueda.cod_n,
busqueda.cod_grupo,busqueda.cod_tipo,busqueda.cod_sec,
busqueda.descrip_esp,busqueda.unidad_med,busqueda.cantidad,
busqueda.precio,busqueda.cantidad_2,busqueda.cod_mov,
busqueda.fecha_doc,busqueda.documento,busqueda.status_mov,
busqueda.simbolo,busqueda.vendedor,busqueda.monto_cotizacion,
busqueda.condicion,busqueda.estado_orden,busqueda.telefono,
busqueda.celular,busqueda.email,busqueda.contacto
IF STATUS = NOTFOUND THEN
LET hay_datos = FALSE
END IF
END WHILE
FINISH REPORT reporte_16 FINISH REPORT reporte_16
END IF END IF
CLOSE busca
AFTER DIALOG AFTER DIALOG
@@ -349,7 +384,7 @@ BEFORE GROUP OF x.cotizacion_no
PRINTX x.cotizacion_no,x.direccion_proyecto,x.nombre_proyecto, PRINTX x.cotizacion_no,x.direccion_proyecto,x.nombre_proyecto,
x.tipo_cliente,x.sec_cliente,x.telefono_r,x.num_oc,x.fecha,x.fecha_cierre, x.tipo_cliente,x.sec_cliente,x.telefono_r,x.num_oc,x.fecha,x.fecha_cierre,
x.fecha_entrega,x.fecha_oc x.fecha_entrega,x.fecha_oc,p_compania.nombre
BEFORE GROUP OF x.codigo BEFORE GROUP OF x.codigo
+1 -1
View File
@@ -1,4 +1,4 @@
database marmotech database smarmotech
screen screen
{ {
+11 -2
View File
@@ -18,6 +18,8 @@ GLOBALS
decide CHAR(1), decide CHAR(1),
entrada CHAR(14), entrada CHAR(14),
detalle1 CHAR(30) detalle1 CHAR(30)
DEFINE p_reportfile STRING
DEFINE p_ref_chk CHAR(50)
DEFINE prt_mvto11 RECORD DEFINE prt_mvto11 RECORD
factura CHAR(10), factura CHAR(10),
@@ -67,7 +69,8 @@ END MAIN
EXIT INPUT EXIT INPUT
END IF END IF
AFTER FIELD entrada AFTER FIELD entrada
SELECT UNIQUE a.ref FROM cgtb00004 a display "DIAG AFTER FIELD entrada: [",entrada CLIPPED,"]"
SELECT UNIQUE a.ref INTO p_ref_chk FROM cgtb00004 a
WHERE a.ref = entrada WHERE a.ref = entrada
IF STATUS != NOTFOUND THEN IF STATUS != NOTFOUND THEN
@@ -111,6 +114,7 @@ END MAIN
END IF END IF
END INPUT END INPUT
display "DIAG DESPUES DE INPUT: [",entrada CLIPPED,"]"
IF int_flag THEN IF int_flag THEN
LET numero_msg = 2 LET numero_msg = 2
@@ -119,7 +123,11 @@ END MAIN
RETURN RETURN
END IF END IF
CALL configureoutput("SVG") RETURNING handler -- La API de configuracion de reportes (fgl_report_*) no esta
-- disponible en este FGL; se escribe el XML directo a un archivo
-- en FGLSPOOL en lugar de la vista previa SVG.
LET p_reportfile = FGL_GETENV("FGLSPOOL"), "/cpprrp011_cuentasft.xml"
LET handler = om.XmlWriter.createFileWriter(p_reportfile)
START REPORT cuenta_ft TO XML HANDLER handler START REPORT cuenta_ft TO XML HANDLER handler
DECLARE movto CURSOR FOR DECLARE movto CURSOR FOR
@@ -355,6 +363,7 @@ END MAIN
LET t_debito = t_debito + reg_final.debito LET t_debito = t_debito + reg_final.debito
LET t_credito = t_credito + reg_final.credito LET t_credito = t_credito + reg_final.credito
IF decide = "S" THEN IF decide = "S" THEN
display "DIAGNOSTICO decide=[",decide,"] entrada=[",entrada CLIPPED,"]"
INSERT INTO cgtb00004 (fecha, tipo, ref, cuenta_no,departamento, num_doc, INSERT INTO cgtb00004 (fecha, tipo, ref, cuenta_no,departamento, num_doc,
cod_aux, cod_sec, detalles, detalle_1, detalle_2, debito, credito, status_t, cod_aux, cod_sec, detalles, detalle_1, detalle_2, debito, credito, status_t,
us_crea, fech_crea, us_mod, fech_mod) us_crea, fech_crea, us_mod, fech_mod)
+21 -4
View File
@@ -10,6 +10,7 @@
GLOBALS GLOBALS
"cpprgb000.4gl" "cpprgb000.4gl"
DEFINE selec1 CHAR(500) DEFINE selec1 CHAR(500)
DEFINE p_reportfile STRING
DEFINE mvto RECORD DEFINE mvto RECORD
fecha_in DATE, fecha_in DATE,
@@ -34,6 +35,17 @@ GLOBALS
id INTEGER id INTEGER
END RECORD END RECORD
MAIN
DEFER INTERRUPT
CALL ARG_VAL(1) RETURNING usuarios
CALL ARG_VAL(2) RETURNING clave
CONNECT to "smarmotech" user usuarios USING clave
SELECT a.* INTO p_companias.* FROM companias a
CALL cpprrp017()
END MAIN
FUNCTION cpprrp017() FUNCTION cpprrp017()
CLEAR SCREEN CLEAR SCREEN
OPTIONS OPTIONS
@@ -41,7 +53,6 @@ GLOBALS
#WHENEVER ERROR CONTINUE #WHENEVER ERROR CONTINUE
OPEN FORM cpfmrp017 FROM "cpfmrp017" OPEN FORM cpfmrp017 FROM "cpfmrp017"
DISPLAY FORM cpfmrp017 DISPLAY FORM cpfmrp017
CALL PANTALLA()
DISPLAY "cpprrp017" AT 4,3 ATTRIBUTE(blue) DISPLAY "cpprrp017" AT 4,3 ATTRIBUTE(blue)
DISPLAY "Validacion de Facturas" AT 6,29 DISPLAY "Validacion de Facturas" AT 6,29
LET int_flag = FALSE LET int_flag = FALSE
@@ -60,7 +71,10 @@ GLOBALS
LET selec = LET selec =
"SELECT a.factura,a.cod_sp,a.cod_sp_sec,b.nom_sp,a.fecha,c.valor, ", "SELECT a.factura,a.cod_sp,a.cod_sp_sec,b.nom_sp,a.fecha,c.valor, ",
" a.cuenta_no,a.departamento,a.cod_aux,a.cod_sec,a.num_doc, ", " a.cuenta_no,a.departamento,a.cod_aux,a.cod_sec,a.num_doc, ",
" a.debito,a.credito,a.rowid ", " a.debito,a.credito, ",
-- a.rowid es una pseudo-columna de Informix, no existe en SQL Server;
-- se sustituye por un numero de fila equivalente para el orden del reporte.
" ROW_NUMBER() OVER (ORDER BY a.factura) ",
"FROM cptb00003 a,cotb00001 b,cptb00001 c ", "FROM cptb00003 a,cotb00001 b,cptb00001 c ",
"WHERE (a.cod_sp = b.cod_sp AND a.cod_sp_sec = b.cod_sp_sec) and ", "WHERE (a.cod_sp = b.cod_sp AND a.cod_sp_sec = b.cod_sp_sec) and ",
" (a.cod_sp = c.cod_sp AND a.cod_sp_sec = c.cod_sp_sec) and ", " (a.cod_sp = c.cod_sp AND a.cod_sp_sec = c.cod_sp_sec) and ",
@@ -74,7 +88,10 @@ GLOBALS
DECLARE movto CURSOR FOR comando DECLARE movto CURSOR FOR comando
OPEN movto OPEN movto
START REPORT val_ctas TO "C:\\archivo" -- La ruta original "C:\archivo" no es escribible sin privilegios de
-- administrador; se usa un archivo en FGLSPOOL en su lugar.
LET p_reportfile = FGL_GETENV("FGLSPOOL"), "/cpprrp017_valctas.txt"
START REPORT val_ctas TO p_reportfile
DISPLAY "<< " AT 19,14 DISPLAY "<< " AT 19,14
DISPLAY "<< Impresion En Proceso .... Espere Por Favor. >>" AT 19,14 DISPLAY "<< Impresion En Proceso .... Espere Por Favor. >>" AT 19,14
@@ -88,7 +105,7 @@ GLOBALS
OUTPUT TO REPORT val_ctas(prt_mvto11.*) OUTPUT TO REPORT val_ctas(prt_mvto11.*)
END WHILE END WHILE
FINISH REPORT val_ctas FINISH REPORT val_ctas
RUN "type C:\\archivo > %USPRINT%" END FUNCTION END FUNCTION
REPORT val_ctas(x) REPORT val_ctas(x)
DEFINE x RECORD DEFINE x RECORD
+72 -4
View File
@@ -242,6 +242,14 @@
<Configuration commandLineArguments="alopez Lopez2023 70" id="-700000010" label="Configuration"/> <Configuration commandLineArguments="alopez Lopez2023 70" id="-700000010" label="Configuration"/>
<File filePath="cpdir/cpprrp004.4gl"/> <File filePath="cpdir/cpprrp004.4gl"/>
</Application> </Application>
<Application binaryName="cpprrp011" dependencies="-594793224,-1026233879,-764824792,1811699727,-1423229125" environment="dir:FGLSPOOL=$(ProjectDir)/spool" id="-700000011" label="cpprrp011">
<Configuration commandLineArguments="alopez Lopez2023 70" id="-700000012" label="Configuration"/>
<File filePath="cpdir/cpprrp011.4gl"/>
</Application>
<Application binaryName="cpprrp017" dependencies="-594793224,-1026233879,-764824792,1811699727,-1423229125" environment="dir:FGLSPOOL=$(ProjectDir)/spool" id="-700000013" label="cpprrp017">
<Configuration commandLineArguments="alopez Lopez2023" id="-700000014" label="Configuration"/>
<File filePath="cpdir/cpprrp017.4gl"/>
</Application>
<Library binaryName="FORMULARIOS_CP" id="1811699727" label="FORMULARIOS_CP"> <Library binaryName="FORMULARIOS_CP" id="1811699727" label="FORMULARIOS_CP">
<File filePath="cpdir/cpfmmt001.4fd"/> <File filePath="cpdir/cpfmmt001.4fd"/>
<File filePath="cpdir/cpfmmt002.4fd"/> <File filePath="cpdir/cpfmmt002.4fd"/>
@@ -252,6 +260,8 @@
<File filePath="cpdir/cpfmrp002.per"/> <File filePath="cpdir/cpfmrp002.per"/>
<File filePath="cpdir/cpfmrp003.per"/> <File filePath="cpdir/cpfmrp003.per"/>
<File filePath="cpdir/cpfmrp004.per"/> <File filePath="cpdir/cpfmrp004.per"/>
<File filePath="cpdir/cpfmrp010.per"/>
<File filePath="cpdir/cpfmrp017.per"/>
</Library> </Library>
<Library binaryName="FUNCIONES_CP" dependencies="-1026233879" id="-594793224" label="FUNCIONES_CP"> <Library binaryName="FUNCIONES_CP" dependencies="-1026233879" id="-594793224" label="FUNCIONES_CP">
<File filePath="cpdir/cpprgb000.4gl"/> <File filePath="cpdir/cpprgb000.4gl"/>
@@ -291,8 +301,65 @@
</Library> </Library>
</Group> </Group>
<Group id="202834315" label="MATERIA PRIMA"> <Group id="202834315" label="MATERIA PRIMA">
<Library binaryName="FORMULARIOS_IN" id="-863149381" label="FORMULARIOS_IN"/> <Library binaryName="FORMULARIOS_IN" id="-863149381" label="FORMULARIOS_IN">
<Library binaryName="FUNCIONES_IN" id="-801525068" label="FUNCIONES_IN"/> <File filePath="../PROYECTOS/indir/infmmt002.per"/>
<File filePath="../PROYECTOS/indir/infmmt005.per"/>
</Library>
<Library binaryName="FUNCIONES_IN" dependencies="-1026233879" id="-801525068" label="FUNCIONES_IN">
<File filePath="../PROYECTOS/indir/inprgb000.4gl"/>
</Library>
<Application binaryName="inprmt002" dependencies="-801525068,-1026233879,-764824792" id="-900000001" label="inprmt002">
<Configuration commandLineArguments="jpeguero Peguero2023" id="-900000002" label="Configuration"/>
<File filePath="../PROYECTOS/indir/inprmt002.4gl"/>
</Application>
<Application binaryName="inprmt005" dependencies="-801525068,-1026233879,-764824792" id="-900000003" label="inprmt005">
<Configuration commandLineArguments="jpeguero Peguero2023" id="-900000004" label="Configuration"/>
<File filePath="../PROYECTOS/indir/inprmt005.4gl"/>
</Application>
<Application binaryName="inprmt013" dependencies="-801525068,-1026233879,-764824792" id="-900000005" label="inprmt013">
<Configuration commandLineArguments="jpeguero Peguero2023" id="-900000006" label="Configuration"/>
<File filePath="../PROYECTOS/indir/inprmt013.4gl"/>
</Application>
<Application binaryName="inprmt046" dependencies="-801525068,-1026233879,-764824792" id="-900000007" label="inprmt046">
<Configuration commandLineArguments="jpeguero Peguero2023" id="-900000008" label="Configuration"/>
<File filePath="../PROYECTOS/indir/inprmt046.4gl"/>
</Application>
<Application binaryName="inprmt036" dependencies="-801525068,-1026233879,-764824792" id="-900000009" label="inprmt036">
<Configuration commandLineArguments="jpeguero Peguero2023" id="-900000010" label="Configuration"/>
<File filePath="../PROYECTOS/indir/inprmt036.4gl"/>
</Application>
<Application binaryName="inprmt066" dependencies="-801525068,-1026233879,-764824792" id="-900000011" label="inprmt066">
<Configuration commandLineArguments="jpeguero Peguero2023" id="-900000012" label="Configuration"/>
<File filePath="../PROYECTOS/indir/inprmt066.4gl"/>
</Application>
<Application binaryName="inprcs006" dependencies="-801525068,-1026233879,-764824792" id="-900000013" label="inprcs006">
<Configuration commandLineArguments="jpeguero Peguero2023" id="-900000014" label="Configuration"/>
<File filePath="../PROYECTOS/indir/inprcs006.4gl"/>
</Application>
<Application binaryName="inprrp003" dependencies="-801525068,-1026233879,-764824792" externalDependencies="libgre.42x" id="-900000015" label="inprrp003">
<Configuration commandLineArguments="jpeguero Peguero2023" id="-900000016" label="Configuration"/>
<File compilerOptions="--build-rdd" filePath="../PROYECTOS/indir/inprrp003.4gl"/>
</Application>
<Application binaryName="inprrp005" dependencies="-801525068,-1026233879,-764824792" externalDependencies="libgre.42x" id="-900000017" label="inprrp005">
<Configuration commandLineArguments="jpeguero Peguero2023" id="-900000018" label="Configuration"/>
<File compilerOptions="--build-rdd" filePath="../PROYECTOS/indir/inprrp005.4gl"/>
</Application>
<Application binaryName="inprrp008" dependencies="-801525068,-1026233879,-764824792" externalDependencies="libgre.42x" id="-900000019" label="inprrp008">
<Configuration commandLineArguments="jpeguero Peguero2023" id="-900000020" label="Configuration"/>
<File compilerOptions="--build-rdd" filePath="../PROYECTOS/indir/inprrp008.4gl"/>
</Application>
<Application binaryName="inprrp009" dependencies="-801525068,-1026233879,-764824792" externalDependencies="libgre.42x" id="-900000021" label="inprrp009">
<Configuration commandLineArguments="jpeguero Peguero2023" id="-900000022" label="Configuration"/>
<File compilerOptions="--build-rdd" filePath="../PROYECTOS/indir/inprrp009.4gl"/>
</Application>
<Application binaryName="inprrp028" dependencies="-801525068,-1026233879,-764824792" externalDependencies="libgre.42x" id="-900000023" label="inprrp028">
<Configuration commandLineArguments="jpeguero Peguero2023" id="-900000024" label="Configuration"/>
<File compilerOptions="--build-rdd" filePath="../PROYECTOS/indir/inprrp028.4gl"/>
</Application>
<Application binaryName="inprrp011" dependencies="-801525068,-1026233879,-764824792" externalDependencies="libgre.42x" id="-900000025" label="inprrp011">
<Configuration commandLineArguments="jpeguero Peguero2023" id="-900000026" label="Configuration"/>
<File compilerOptions="--build-rdd" filePath="../PROYECTOS/indir/inprrp011.4gl"/>
</Application>
</Group> </Group>
<Group id="1302820616" label="NOMINA"> <Group id="1302820616" label="NOMINA">
<Library binaryName="FORMULARIOS_NO" id="-335228674" label="FORMULARIOS_NO"/> <Library binaryName="FORMULARIOS_NO" id="-335228674" label="FORMULARIOS_NO"/>
@@ -331,7 +398,7 @@
<Configuration commandLineArguments="jpeguero Peguero2023" id="-974560942" label="Configuration"/> <Configuration commandLineArguments="jpeguero Peguero2023" id="-974560942" label="Configuration"/>
<File compilerOptions="--build-rdd" filePath="PRDIR/prprmt021.4gl"/> <File compilerOptions="--build-rdd" filePath="PRDIR/prprmt021.4gl"/>
</Application> </Application>
<Application binaryName="prprmt020" dependencies="-837156229,-1026233879,-764824792" id="-358374666" label="prprmt020"> <Application binaryName="prprmt020" dependencies="-837156229,-1026233879,-764824792,493047263" id="-358374666" label="prprmt020">
<Configuration commandLineArguments="jpeguero Peguero2023" id="240197034" label="Configuration"/> <Configuration commandLineArguments="jpeguero Peguero2023" id="240197034" label="Configuration"/>
<File filePath="PRDIR/prprmt020.4gl"/> <File filePath="PRDIR/prprmt020.4gl"/>
</Application> </Application>
@@ -348,7 +415,7 @@
<File compilerOptions="--build-rdd" filePath="PRDIR/prprrp116.4gl"/> <File compilerOptions="--build-rdd" filePath="PRDIR/prprrp116.4gl"/>
</Application> </Application>
<Library binaryName="FORMULARIOS_PR" dependencies="-1026233879" id="-956683955" label="FORMULARIOS_PR"> <Library binaryName="FORMULARIOS_PR" dependencies="-1026233879" id="-956683955" label="FORMULARIOS_PR">
<File filePath="PRDIR/prfmrp116.per"/> <File filePath="PRDIR/prfmrp116.4fd"/>
<File filePath="PRDIR/prfmmt008.4fd"/> <File filePath="PRDIR/prfmmt008.4fd"/>
<File filePath="vedir/vefmwd002.4fd"/> <File filePath="vedir/vefmwd002.4fd"/>
<File filePath="ctdir/prfmmt003.per"/> <File filePath="ctdir/prfmmt003.per"/>
@@ -381,6 +448,7 @@
<File filePath="PRDIR/pretiquetas.4gl"/> <File filePath="PRDIR/pretiquetas.4gl"/>
<File filePath="PRDIR/prempacar.4gl"/> <File filePath="PRDIR/prempacar.4gl"/>
<File filePath="otrodir/bcode128.4gl"/> <File filePath="otrodir/bcode128.4gl"/>
<File filePath="../PROYECTOS/otrodir/codmov.4gl"/>
</Library> </Library>
</Group> </Group>
<Group id="46006545" label="RECURSOS HUMANOS"> <Group id="46006545" label="RECURSOS HUMANOS">