Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea88c93da3 | ||
|
|
7d5a853351 |
@@ -20,6 +20,7 @@ DEFINE HANDLER om.SaxDocumentHandler, -- return value from fgl_report_commitCurr
|
||||
DEFINE selec5 STRING
|
||||
DEFINE anos CHAR(4)
|
||||
DEFINE jdx INTEGER
|
||||
DEFINE hay_filas SMALLINT
|
||||
DEFINE fecha_inicio, fecha_corte, fecha1 DATE, reporte_tipo INT
|
||||
|
||||
MAIN
|
||||
@@ -52,6 +53,7 @@ FUNCTION ctprrp004()
|
||||
|
||||
OPEN FORM ctfmrp004 FROM "ctfmrp004"
|
||||
DISPLAY FORM ctfmrp004
|
||||
CALL ui.Window.getCurrent().setText("Reporte Produccion Diaria")
|
||||
|
||||
CONSTRUCT criterio ON c.departamento, c.cod_prod FROM departamento, cod_prod
|
||||
|
||||
@@ -166,35 +168,42 @@ FUNCTION ctprrp004()
|
||||
|
||||
|
||||
LET r_filename = 'ctprrp004.4rp'
|
||||
IF fgl_report_loadCurrentSettings(r_filename) THEN
|
||||
LET preview=1
|
||||
CALL selectoutput() RETURNING r_output
|
||||
CALL fgl_report_selectDevice(r_output) -- changing default
|
||||
CALL fgl_report_selectPreview(preview) -- changing default
|
||||
LET handler = fgl_report_commitCurrentSettings() -- commit changes
|
||||
END IF
|
||||
|
||||
START REPORT reporte_detallado TO XML HANDLER HANDLER
|
||||
|
||||
LET fecha_actual = CURRENT YEAR TO FRACTION
|
||||
|
||||
DISPLAY selec5
|
||||
|
||||
|
||||
PREPARE comando4 FROM selec5
|
||||
DECLARE busca4 CURSOR FOR comando4
|
||||
|
||||
LET hay_filas = FALSE
|
||||
|
||||
FOREACH busca4 INTO prod_dia.*
|
||||
|
||||
IF reporte_tipo <> 1 THEN
|
||||
IF NOT hay_filas THEN
|
||||
IF fgl_report_loadCurrentSettings(r_filename) THEN
|
||||
LET preview=1
|
||||
CALL selectoutput() RETURNING r_output
|
||||
CALL fgl_report_selectDevice(r_output)
|
||||
CALL fgl_report_selectPreview(preview)
|
||||
LET handler = fgl_report_commitCurrentSettings()
|
||||
END IF
|
||||
START REPORT reporte_detallado TO XML HANDLER HANDLER
|
||||
LET hay_filas = TRUE
|
||||
END IF
|
||||
|
||||
IF reporte_tipo <> 1 THEN
|
||||
LET prod_dia.num_doc = 0
|
||||
LET prod_dia.fecha = CURRENT
|
||||
END IF
|
||||
|
||||
LET prod_dia.fecha = CURRENT
|
||||
END IF
|
||||
|
||||
OUTPUT TO REPORT reporte_detallado(
|
||||
prod_dia.*, fecha_inicio, fecha_corte, fecha_actual)
|
||||
END FOREACH
|
||||
|
||||
FINISH REPORT reporte_detallado
|
||||
IF hay_filas THEN
|
||||
FINISH REPORT reporte_detallado
|
||||
ELSE
|
||||
CALL fgl_winmessage("INFO", "NO EXISTEN REGISTROS PARA ESTOS PARAMETROS", "INFO")
|
||||
END IF
|
||||
|
||||
IF abortar_reporte THEN
|
||||
RETURN
|
||||
|
||||
@@ -20,6 +20,8 @@ DEFINE HANDLER om.SaxDocumentHandler, -- return value from fgl_report_commitCurr
|
||||
DEFINE selec5 STRING
|
||||
DEFINE anos STRING
|
||||
|
||||
DEFINE hay_filas SMALLINT
|
||||
|
||||
MAIN
|
||||
DEFER INTERRUPT
|
||||
CALL ARG_VAL(1) RETURNING usuarios
|
||||
@@ -55,6 +57,7 @@ FUNCTION ctprrp004()
|
||||
|
||||
OPEN FORM ctfmrp004 FROM "ctfmrp014"
|
||||
DISPLAY FORM ctfmrp004
|
||||
CALL ui.Window.getCurrent().setText("Reporte Produccion Mensual")
|
||||
|
||||
CONSTRUCT criterio ON c.cod_prod FROM cod_prod
|
||||
|
||||
@@ -128,33 +131,40 @@ FUNCTION ctprrp004()
|
||||
|
||||
|
||||
LET r_filename = 'ctprrp014.4rp'
|
||||
IF fgl_report_loadCurrentSettings(r_filename) THEN
|
||||
LET preview=1
|
||||
CALL selectoutput() RETURNING r_output
|
||||
CALL fgl_report_selectDevice(r_output) -- changing default
|
||||
CALL fgl_report_selectPreview(preview) -- changing default
|
||||
LET handler = fgl_report_commitCurrentSettings() -- commit changes
|
||||
END IF
|
||||
|
||||
START REPORT reporte_mensual TO XML HANDLER HANDLER
|
||||
|
||||
LET fecha_actual = CURRENT YEAR TO FRACTION
|
||||
|
||||
DISPLAY selec5
|
||||
|
||||
|
||||
PREPARE comando4 FROM selec5
|
||||
DECLARE busca4 CURSOR FOR comando4
|
||||
|
||||
LET hay_filas = FALSE
|
||||
|
||||
FOREACH busca4 INTO prod_dia.*
|
||||
|
||||
IF prod_dia.semielaborado IS NULL THEN
|
||||
|
||||
IF NOT hay_filas THEN
|
||||
IF fgl_report_loadCurrentSettings(r_filename) THEN
|
||||
LET preview=1
|
||||
CALL selectoutput() RETURNING r_output
|
||||
CALL fgl_report_selectDevice(r_output)
|
||||
CALL fgl_report_selectPreview(preview)
|
||||
LET handler = fgl_report_commitCurrentSettings()
|
||||
END IF
|
||||
START REPORT reporte_mensual TO XML HANDLER HANDLER
|
||||
LET hay_filas = TRUE
|
||||
END IF
|
||||
|
||||
IF prod_dia.semielaborado IS NULL THEN
|
||||
LET abortar_reporte = TRUE;
|
||||
END IF
|
||||
|
||||
END IF
|
||||
|
||||
OUTPUT TO REPORT reporte_mensual(prod_dia.*, anos, fecha_actual);
|
||||
END FOREACH
|
||||
|
||||
FINISH REPORT reporte_mensual
|
||||
IF hay_filas THEN
|
||||
FINISH REPORT reporte_mensual
|
||||
ELSE
|
||||
CALL fgl_winmessage("INFO", "NO EXISTEN REGISTROS PARA ESTOS PARAMETROS", "INFO")
|
||||
END IF
|
||||
|
||||
IF abortar_reporte THEN
|
||||
RETURN
|
||||
|
||||
Reference in New Issue
Block a user