- Mueve todo el contenido de PROYECTOS/indir y varias funciones compartidas de PROYECTOS/otrodir hacia PROYECTO, siguiendo instruccion de Johnny (PROYECTOS se va a eliminar). - inprmt002: agrega campo Desglose faltante, corrige typo "eLiminar". - inprmt005: agrega formulario y 3 campos faltantes (Consumo, Requiere Autorizacion, Requisiciones), corrige typo "eLiminar". - inprmt013: agrega formulario, titulo, corrige typo "eLiminar". - inprmt046: agrega formulario y varias funciones/dependencias faltantes (cincodmov, clasf_bloque, medidas, defecto, buscaEmp, consultaTransportista, busca_departamento); corrige nombres de campo desalineados con el codigo (depto_a, bodega) y los convierte a ComboBox donde el codigo lo requiere. - Corrige dependencia faltante de FORMULARIOS_IN a la libreria Database (bloqueaba todo el modulo de MATERIA PRIMA).
215 lines
6.7 KiB
Plaintext
215 lines
6.7 KiB
Plaintext
{
|
|
------------------------------------------------------------------
|
|
PROGRAMA : INPRRP016
|
|
OBJETIVO : Imprimir listado de diferencias entre las exis-
|
|
tencias actuales y las fisicas.
|
|
PROGRAMADOR : Tadeo A. Ferreras F.
|
|
MODIFICADO :
|
|
FECHA REALIZACION : Mayo 11,1993.
|
|
------------------------------------------------------------------
|
|
}
|
|
globals
|
|
"inprgb000.4gl"
|
|
DEFINE semana RECORD
|
|
semana_ini LIKE intb00015.semana_del
|
|
END RECORD
|
|
|
|
MAIN
|
|
DEFER INTERRUPT
|
|
SELECT * INTO p_companias.* FROM companias
|
|
CALL inprrp016()
|
|
END MAIN
|
|
|
|
FUNCTION inprrp016()
|
|
DEFINE prt_difer RECORD
|
|
cod_n LIKE intb00015.cod_n,
|
|
cod_grupo LIKE intb00015.cod_grupo,
|
|
cod_tipo LIKE intb00015.cod_tipo,
|
|
cod_sec LIKE intb00015.cod_sec,
|
|
descri_esp LIKE intb00001.descrip_esp,
|
|
categoria LIKE intb00014.categoria,
|
|
semana_del LIKE intb00015.semana_del,
|
|
semana_al LIKE intb00015.semana_al,
|
|
exis_act LIKE intb00015.exis_act,
|
|
exis_fisica LIKE intb00015.exis_fisica,
|
|
dIFerencia DECIMAL(10,2)
|
|
END RECORD,
|
|
i,c,dia,cant1,cant INTEGER
|
|
#whenever error continue
|
|
OPTIONS
|
|
FORM LINE 8
|
|
|
|
OPEN FORM infmrp016 FROM "infmrp016"
|
|
CLEAR SCREEn
|
|
CALL pantalla()
|
|
DISPLAY "inprrp016" at 4,3 attribute(yellow)
|
|
DISPLAY "Diferencia Existencia en Inventario Perpetuo" at 6,18
|
|
DISPLAY form infmrp016
|
|
LET tipo_papel = 1
|
|
CALL msgrp000(tipo_papel)
|
|
|
|
INPUT BY NAME semana.semana_ini
|
|
AFTER FIELD semana_ini
|
|
IF semana.semana_ini IS NULL THEN
|
|
LET numero_msg = 16
|
|
CALL msg(numero_msg)
|
|
NEXT FIELD semana_ini
|
|
END IF
|
|
END INPUT
|
|
|
|
IF int_flag THEN
|
|
LET numero_msg = 2
|
|
CALL msg(numero_msg)
|
|
LET int_flag = false
|
|
RETURN
|
|
END IF
|
|
|
|
DECLARE buscar CURSOR FOR
|
|
SELECT a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec,
|
|
e.descrip_esp,m.categoria,a.semana_del,a.semana_al,
|
|
a.exis_act,a.exis_fisica,a.exis_fisica - a.exis_act
|
|
FROM intb00015 a,intb00001 e ,intb00014 m
|
|
WHERE a.cod_n = e.cod_n AND a.cod_grupo = e.cod_grupo and
|
|
a.cod_tipo = e.cod_tipo AND a.cod_sec = e.cod_sec AND
|
|
a.cod_n = m.cod_n AND a.cod_grupo = m.cod_grupo AND
|
|
a.cod_tipo = m.cod_tipo AND a.cod_sec = m.cod_sec and
|
|
a.status_t IS NULL AND a.semana_del = semana.semana_ini
|
|
ORDER BY 1,2,3,4
|
|
|
|
IF STATUS < 0 THEN
|
|
CALL integridad()
|
|
IF bandera = 1 THEN
|
|
LET bandera = 0
|
|
RETURN
|
|
END IF
|
|
END IF
|
|
|
|
IF int_flag THEN
|
|
LET numero_msg = 2
|
|
CALL msg(numero_msg)
|
|
LET int_flag = false
|
|
RETURN
|
|
END IF
|
|
|
|
DISPLAY "Buscando Informacion ... Espere por favor" at 19,14
|
|
ATTRIBUTE(REVERSE,BOLD)
|
|
|
|
#prepare busqueda from selec1
|
|
#declare buscar scroll cursor for busqueda
|
|
|
|
START REPORT difer_mp to "C:\\archivo"
|
|
|
|
DISPLAY "Reporte Generandose ... Por Favor Espere" at 19,14
|
|
ATTRIBUTE(REVERSE)
|
|
|
|
FOREACH buscar INTO prt_dIFer.*
|
|
OUTPUT TO REPORT difer_mp(prt_dIFer.*)
|
|
END FOREACH
|
|
FINISH REPORT dIFer_mp
|
|
RUN "type C:\\archivo > %USPRINT%" END FUNCTION
|
|
|
|
REPORT difer_mp(x)
|
|
DEFINE x RECORD
|
|
cod_n LIKE intb00015.cod_n,
|
|
cod_grupo LIKE intb00015.cod_grupo,
|
|
cod_tipo LIKE intb00015.cod_tipo,
|
|
cod_sec LIKE intb00015.cod_sec,
|
|
descri_esp LIKE intb00001.descrip_esp,
|
|
categoria LIKE intb00014.categoria,
|
|
semana_del LIKE intb00015.semana_del,
|
|
semana_al LIKE intb00015.semana_al,
|
|
exis_act LIKE intb00015.exis_act,
|
|
exis_fisica LIKE intb00015.exis_fisica,
|
|
diferencia DECIMAL(10,2)
|
|
END RECORD,
|
|
fecha DATE,
|
|
i,c INTEGER
|
|
|
|
DEFINE doble_on CHAR(2)
|
|
DEFINE doble_off CHAR(2)
|
|
DEFINE negrillas_on CHAR(2)
|
|
DEFINE negrillas_off CHAR(2)
|
|
DEFINE comp_on CHAR(3)
|
|
DEFINE comp_off CHAR(2)
|
|
DEFINE doce,normal CHAR(2)
|
|
DEFINE hora CHAR(5)
|
|
DEFINE l SMALLINT
|
|
DEFINE varia CHAR(10)
|
|
|
|
ORDER BY x.categoria,x.cod_n,x.cod_grupo,x.cod_tipo,x.cod_sec
|
|
FORMAT
|
|
PAGE HEADER
|
|
LET doble_on = ASCII 14
|
|
LET doble_off = ASCII 20
|
|
LET negrillas_on = ASCII 27, ASCII 69
|
|
LET negrillas_off = ASCII 27, ASCII 70
|
|
LET normal = ASCII 27, ASCII 80
|
|
LET comp_on = ASCII 15
|
|
LET comp_off = ASCII 18
|
|
LET doce = ASCII 27, ASCII 77
|
|
LET hora = time
|
|
LET fecha = today
|
|
|
|
|
|
LET lj = (133 - LENGTH(p_companias.nombre CLIPPED))/2
|
|
PRINT COLUMN 1,comp_on,negrillas_on
|
|
PRINT COLUMN 1,"inprrp016",
|
|
COLUMN lj, p_companias.nombre CLIPPED,
|
|
COLUMN 126, "Pag. ",pageno using "###"
|
|
PRINT COLUMN 44, "Diferencias de Existencias en Inventario Perpetuo",
|
|
COLUMN 126, today using "dd/mm/yyyy"
|
|
PRINT COLUMN 52, "Semana del ",x.semana_del using "dd/mm/yyyy",
|
|
" Al ",x.semana_al using "dd/mm/yyyy",
|
|
COLUMN 129, hora
|
|
|
|
SKIP 1 LINE
|
|
|
|
PRINT COLUMN 1, "______________________________________________________",
|
|
"______________________________________________________",
|
|
"_________________________"
|
|
PRINT COLUMN 92,"Existencia"
|
|
PRINT COLUMN 2,"Materiales",
|
|
COLUMN 15,"Descripcion",
|
|
COLUMN 85,"Fisica Actual",
|
|
COLUMN 115,"Diferencia %"
|
|
PRINT COLUMN 1, "______________________________________________________",
|
|
"______________________________________________________",
|
|
"_________________________"
|
|
PRINT negrillas_off
|
|
SKIP 1 LINE
|
|
|
|
BEFORE GROUP OF x.categoria
|
|
|
|
LET i = 0
|
|
PRINT COLUMN 1,negrillas_on
|
|
PRINT COLUMN 2,"Categoria...",x.categoria,negrillas_off
|
|
SKIP 1 LINE
|
|
ON EVERY ROW
|
|
PRINT COLUMN 2, x.cod_n using "&","-",x.cod_grupo using "&","-",
|
|
x.cod_tipo using "&&","-",x.cod_sec using "&&&",
|
|
COLUMN 15, x.descri_esp clipped,
|
|
COLUMN 76, x.exis_fisica using "###,###,###.##",
|
|
COLUMN 94, x.exis_act using "###,###,###.##";
|
|
IF x.diferencia <>0 AND x.exis_act <> 0 THEN
|
|
PRINT COLUMN 106, x.diferencia using "(((,(((,(((.##)"," ",
|
|
(x.diferencia/x.exis_act)* 100 USING "(((.##)"
|
|
ELSE
|
|
PRINT COLUMN 106, x.diferencia using "(((,(((,(((.##)"," ",
|
|
" 0.000"
|
|
END IF
|
|
LET i = i + 1
|
|
IF c IS NULL THEN LET c = 0 END IF
|
|
LET c = c + 1
|
|
AFTER GROUP OF x.categoria
|
|
SKIP 1 LINE
|
|
PRINT COLUMN 2, negrillas_on,"Total registro en categoria (",
|
|
x.categoria clipped,") ",i,negrillas_off
|
|
SKIP 1 LINE
|
|
ON LAST ROW
|
|
SKIP 1 LINE
|
|
PRINT COLUMN 2, negrillas_on,"Total registro en general ",c,
|
|
negrillas_off
|
|
LET c = 0
|
|
PRINT COLUMN 1, comp_off
|
|
END REPORT
|