diff --git a/PROYECTO/acdir/acfmrp010.4fd b/PROYECTO/acdir/acfmrp010.4fd index 8542f05..0eef545 100644 --- a/PROYECTO/acdir/acfmrp010.4fd +++ b/PROYECTO/acdir/acfmrp010.4fd @@ -35,14 +35,16 @@ + + -
+ - + - + - + diff --git a/PROYECTO/acdir/acprrp010.4gl b/PROYECTO/acdir/acprrp010.4gl index f30f6f1..0c73761 100644 --- a/PROYECTO/acdir/acprrp010.4gl +++ b/PROYECTO/acdir/acprrp010.4gl @@ -14,7 +14,9 @@ GLOBALS kcantidad DEC(12,4), codlista,cia_logo SMALLINT, xnum_emp,xnum_oc INT, - cliente,nombre_empleado,nom1,nom2,apell1,apell2 VARCHAR(100) + xnum_ocp INT, -- orden de compra (cotb00014) + cliente,nombre_empleado,nom1,nom2,apell1,apell2 VARCHAR(100), + proveedor VARCHAR(100) -- proveedor de la orden de compra (cotb00001) MAIN DEFER INTERRUPT CALL ARG_VAL(1) RETURNING usuarios @@ -81,7 +83,16 @@ ON ACTION cancel FROM codigo_act,descripcion_act,codigo_dp END IF IF inventario = "PRODUCTOS TERMINADOS" THEN - INPUT BY NAME xnum_oc,xnum_emp,bloque + INPUT BY NAME xnum_oc,xnum_ocp,xnum_emp,bloque + AFTER FIELD xnum_ocp + IF xnum_ocp IS NULL THEN + LET proveedor = NULL + DISPLAY BY NAME proveedor + ELSE + IF NOT busca_proveedor_oc() THEN + NEXT FIELD xnum_ocp + END IF + END IF ON ACTION busca_emp CALL busca_empleado1() RETURNING Xnum_emp,nom1,nom2,apell1,apell2 LET nombre_empleado = xnum_emp USING "<<<<<","-",nom1 CLIPPED,apell1 CLIPPED @@ -127,7 +138,15 @@ ON ACTION cancel CALL fgl_Winmessage("INFO","EMPLEADO NO EXISTE","INFO") NEXT FIELD xnum_emp END IF - DISPLAY BY NAME nombre_empleado + DISPLAY BY NAME nombre_empleado + END IF + IF xnum_ocp IS NOT NULL THEN + IF NOT busca_proveedor_oc() THEN + NEXT FIELD xnum_ocp + END IF + ELSE + LET proveedor = NULL + DISPLAY BY NAME proveedor END IF EXIT INPUT END INPUT @@ -243,25 +262,25 @@ CALL set_count(idx-1) INPUT ARRAY despiece WITHOUT DEFAULTS FROM smedida.* AFTER FIELD lado3 LET idx = arr_curr() - IF despiece[idx].unidad= "M2" THEN - LET despiece[idx].medida = - despiece[idx].cantidad * (despiece[idx].lado1 * despiece[idx].lado2) - END IF - - IF despiece[idx].unidad= "M3" THEN - LET despiece[idx].medida = - despiece[idx].cantidad * (despiece[idx].lado1 * despiece[idx].lado2 * despiece[idx].lado3) - END IF - - IF despiece[idx].unidad= "ML" THEN - LET despiece[idx].medida = - despiece[idx].cantidad * despiece[idx].lado1 - LET despiece[idx].lado2 = 0 - END IF - - IF despiece[idx].unidad= "UD" OR despiece[idx].unidad= "GL" THEN - LET despiece[idx].medida = despiece[idx].cantidad - END IF + IF despiece[idx].unidad= "M2" THEN + LET despiece[idx].medida = + despiece[idx].cantidad * (despiece[idx].lado1 * despiece[idx].lado2) + END IF + + IF despiece[idx].unidad= "M3" THEN + LET despiece[idx].medida = + despiece[idx].cantidad * (despiece[idx].lado1 * despiece[idx].lado2 * despiece[idx].lado3) + END IF + + IF despiece[idx].unidad= "ML" THEN + LET despiece[idx].medida = + despiece[idx].cantidad * despiece[idx].lado1 + LET despiece[idx].lado2 = 0 + END IF + + IF despiece[idx].unidad= "UD" OR despiece[idx].unidad= "GL" THEN + LET despiece[idx].medida = despiece[idx].cantidad + END IF AFTER FIELD cantidad LET idx = arr_curr() @@ -376,9 +395,29 @@ REPORT activos(x,descripcion,xfecha_compra,xprecio,xsimbolo,xcodigo,xunidadmed, END IF PRINTX x,codigo_dp,descripcion,descripcion_dp,fecha,barcodigo_act, Xfecha_compra,xprecio,xsimbolo,xcodigo,xvalor_medida,xcantidad, - xlado1,xlado2,xlado3,xunidadmed,cia_logo,xnum_emp,xnum_oc,cliente,nombre_empleado,bloque + xlado1,xlado2,xlado3,xunidadmed,cia_logo,xnum_emp,xnum_oc,cliente,nombre_empleado,bloque, + xnum_ocp,proveedor END REPORT +# Valida la orden de compra (cotb00014, no anulada) y trae su proveedor (cotb00001) +FUNCTION busca_proveedor_oc() + LET proveedor = NULL + SELECT CAST(b.cod_sp AS VARCHAR(4))+'-'+ + CAST(b.cod_sp_sec AS VARCHAR(4))+' '+RTRIM(b.nom_sp) + INTO proveedor + FROM cotb00014 a,cotb00001 b + WHERE a.num_oc = xnum_ocp AND a.status_t IS NULL AND + a.cod_sp = b.cod_sp AND a.cod_sp_sec = b.cod_sp_sec + IF STATUS = NOTFOUND THEN + LET proveedor = NULL + DISPLAY BY NAME proveedor + CALL fgl_winmessage("INFO","ORDEN DE COMPRA NO EXISTE O ESTA ANULADA","INFO") + RETURN FALSE + END IF + DISPLAY BY NAME proveedor + RETURN TRUE +END FUNCTION + FUNCTION codigo_128(cod_val,pcantidad) diff --git a/PROYECTO/bin/acprrp010.4rp b/PROYECTO/bin/acprrp010.4rp index 3333941..a339f2d 100644 --- a/PROYECTO/bin/acprrp010.4rp +++ b/PROYECTO/bin/acprrp010.4rp @@ -44,6 +44,16 @@ + + + + + + + + + + diff --git a/PROYECTO/bin/ipprrp013.4rp b/PROYECTO/bin/ipprrp013.4rp new file mode 100644 index 0000000..3784afc --- /dev/null +++ b/PROYECTO/bin/ipprrp013.4rp @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PROYECTO/bin/ipprrp014.4rp b/PROYECTO/bin/ipprrp014.4rp index aa9ac33..0d8e808 100644 --- a/PROYECTO/bin/ipprrp014.4rp +++ b/PROYECTO/bin/ipprrp014.4rp @@ -16,7 +16,7 @@ - + diff --git a/PROYECTO/bin/ipprrp053.4rp b/PROYECTO/bin/ipprrp053.4rp new file mode 100644 index 0000000..815a3fd --- /dev/null +++ b/PROYECTO/bin/ipprrp053.4rp @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PROYECTO/bin/irprmt020.4rp b/PROYECTO/bin/irprmt020.4rp new file mode 100644 index 0000000..78df87b --- /dev/null +++ b/PROYECTO/bin/irprmt020.4rp @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PROYECTO/bin/irprmt020_1.4rp b/PROYECTO/bin/irprmt020_1.4rp new file mode 100644 index 0000000..5f42d77 --- /dev/null +++ b/PROYECTO/bin/irprmt020_1.4rp @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PROYECTO/bin/irprrp002.4rp b/PROYECTO/bin/irprrp002.4rp new file mode 100644 index 0000000..9d835b6 --- /dev/null +++ b/PROYECTO/bin/irprrp002.4rp @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PROYECTO/bin/irprrp006.4rp b/PROYECTO/bin/irprrp006.4rp new file mode 100644 index 0000000..7870855 --- /dev/null +++ b/PROYECTO/bin/irprrp006.4rp @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PROYECTO/bin/irprrp009.4rp b/PROYECTO/bin/irprrp009.4rp new file mode 100644 index 0000000..17a1f09 --- /dev/null +++ b/PROYECTO/bin/irprrp009.4rp @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PROYECTO/bin/irprrp043.4rp b/PROYECTO/bin/irprrp043.4rp new file mode 100644 index 0000000..93da1fe --- /dev/null +++ b/PROYECTO/bin/irprrp043.4rp @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PROYECTO/bin/irprrpcs008.4rp b/PROYECTO/bin/irprrpcs008.4rp index 4e39cd3..99a7b9b 100644 --- a/PROYECTO/bin/irprrpcs008.4rp +++ b/PROYECTO/bin/irprrpcs008.4rp @@ -1,5 +1,5 @@ - + @@ -8,28 +8,38 @@ + - + - + + + + + + + + + + @@ -45,56 +55,113 @@ - - + + + - + + + - - - - - - - + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -103,11 +170,14 @@ + + + @@ -115,11 +185,14 @@ + - + + + @@ -135,10 +208,15 @@ + + + + + diff --git a/PROYECTO/cgdir/cgfmmt037.4fd b/PROYECTO/cgdir/cgfmmt037.4fd index 32b3539..a62f9c6 100644 --- a/PROYECTO/cgdir/cgfmmt037.4fd +++ b/PROYECTO/cgdir/cgfmmt037.4fd @@ -1,5 +1,5 @@ - + diff --git a/PROYECTO/cgdir/cgfmwd001.per b/PROYECTO/cgdir/cgfmwd001.per index 2f4a3d5..b4db361 100644 --- a/PROYECTO/cgdir/cgfmwd001.per +++ b/PROYECTO/cgdir/cgfmwd001.per @@ -7,7 +7,7 @@ FECHA REALIZADO : Septiembre 28, 1993. MODULO UTILIZA : cgprmt001 -------------------------------------------------------------------------- } - database marmotech + database smarmotech screen { Consulta departamentos diff --git a/PROYECTO/cgdir/cgprmt005.4gl b/PROYECTO/cgdir/cgprmt005.4gl index 9ca0665..b6f7018 100644 --- a/PROYECTO/cgdir/cgprmt005.4gl +++ b/PROYECTO/cgdir/cgprmt005.4gl @@ -52,6 +52,7 @@ FUNCTION cgprmt005() END FUNCTION FUNCTION cgprad005() +DEFINE referencia LIKE cgtb00004.ref -- G6: no estaba declarada (-8446) LET hoy = TODAY LABEL volver1: INITIALIZE recibo.* TO NULL diff --git a/PROYECTO/cgdir/cgprmt022.4gl b/PROYECTO/cgdir/cgprmt022.4gl index 3b934a3..bca5c36 100644 --- a/PROYECTO/cgdir/cgprmt022.4gl +++ b/PROYECTO/cgdir/cgprmt022.4gl @@ -8,14 +8,18 @@ } GLOBALS "cgprgb000.4gl" - + DEFINE pano,pmes,pventas INT, + ptasa DEC(8,2), + preplica VARCHAR(2) + + MAIN DEFER INTERRUPT CALL STARTLOG("CGPRMT021.TXT") CALL ARG_VAL(1) RETURNING usuarios CALL ARG_VAL(2) RETURNING clave - CONNECT to "smarmotech" AS "MSSQL" USER usuarios USING clave + CONNECT to "marmotech" AS "MSSQL" USER usuarios USING clave CALL cgprmt022() END MAIN FUNCTION cgprmt022() @@ -24,50 +28,110 @@ FUNCTION cgprmt022() ano SMALLINT, mes SMALLINT, ventas SMALLINT, - tipo_cliente SMALLINT, + tasa DEC(8,2) - END RECORD - + END RECORD, + actualiza,selec,inserta STRING, + i INT, + clientes DYNAMIC ARRAY OF RECORD + tipo_cliente1 INT, + tasa1 DEC(12,2) + END RECORD, + replica VARCHAR(2) OPEN WINDOW w1 WITH FORM "cgfmmt022" - INPUT BY NAME mtasa.* + DIALOG ATTRIBUTE(UNBUFFERED) + INPUT BY NAME mtasa.*,replica BEFORE INPUT CALL cventas() LET mtasa.ano = YEAR(TODAY) LET mtasa.mes = MONTH(TODAY)-1 DISPLAY BY NAME mtasa.ano,mtasa.mes + LET selec = "SELECT DISTINCT a.ano FROM marmotech.dbo.cgtb00084 a WHERE a.ano = ? AND a.mes = ? AND a.ventas = ? AND a.tipo_cliente = ?" + PREPARE selecciona FROM selec - AFTER INPUT - IF INT_FLAG THEN - CALL msg(16) - LET INT_FLAG = FALSE - EXIT INPUT - END IF - SELECT DISTINCT a.tipo_cliente FROM vetb00061 a WHERE a.tipo_cliente = mtasa.tipo_cliente AND - a.ventas = mtasa.ventas - IF STATUS = NOTFOUND THEN - CALL fgl_winmessage("INFO","COMBINACION TIPO CLIENTE Y MONEDA ESTAN ERRADOS","INFO") - NEXT FIELD ventas - END IF - SELECT DISTINCT a.ano,a.mes,a.ventas,a.tipo_cliente,a.tasa - INTO mtasa.ano,mtasa.mes,mtasa.ventas,mtasa.tipo_cliente - FROM cgtb00084 a WHERE a.ano = mtasa.ano AND a.mes = mtasa.mes AND - a.ventas = mtasa.ventas AND a.tipo_cliente = mtasa.tipo_cliente - IF STATUS <> NOTFOUND THEN - DISPLAY BY NAME mtasa.* - UPDATE cgtb00084 SET cgtb00084.tasa = mtasa.tasa, - us_mod = usuarios, - fech_mod = getdate() - WHERE cgtb00084.ano = mtasa.ano AND cgtb00084.mes = mtasa.mes AND - cgtb00084.ventas = mtasa.ventas AND - cgtb00084.tipo_cliente = mtasa.tipo_cliente - ELSE - INSERT INTO cgtb00084 (ano,mes,ventas,tipo_cliente,tasa,us_crea,fech_crea) VALUES - (mtasa.ano,mtasa.mes,mtasa.ventas,mtasa.tipo_cliente,mtasa.tasa,usuarios,getdate()) - END IF - CALL msg(13) - EXIT INPUT - END INPUT + LET actualiza = "UPDATE marmotech.dbo.cgtb00084 set tasa = ? WHERE ano = ? and mes = ? and ventas =? and tipo_cliente = ?" + PREPARE actual FROM actualiza + + LET inserta = "INSERT INTO marmotech.dbo.cgtb00084 (ano,mes,tipo_cliente,ventas,tasa) values ", + " (?,?,?,?,?)" + PREPARE adicionar FROM inserta + + ON CHANGE tasa + DECLARE busca_tipos CURSOR for + SELECT DISTINCT a.tipo_cliente FROM vetb00061 a WHERE a.ventas = mtasa.ventas AND a.tipo_cliente > 14 + + LET i =1 + FOREACH busca_tipos INTO clientes[i].* + LET clientes[i].tasa1=mtasa.tasa + LET i = i + 1 + END FOREACH + + IF i=1 THEN + CALL fgl_winmessage("INFO","COMBINACION TIPO CLIENTE Y MONEDA ESTAN ERRADOS","INFO") + NEXT FIELD ventas + END IF + END INPUT + DISPLAY ARRAY clientes TO sclientes.* + ON ACTION actualizar ATTRIBUTE(TEXT="Actualiza") + IF fgl_winquestion("Actualiza","Estas seguro de Actualizar la tasa?","No","Yes|No","question",0) = "Yes" THEN + FOR i = 1 TO clientes.getLength() + IF clientes[i].tipo_cliente1 IS NOT NULL THEN + IF clientes[i].tasa1 IS NULL THEN + CALL msg(16) + NEXT FIELD tasa + END IF + SELECT DISTINCT a.ano,a.mes,a.ventas,a.tipo_cliente,a.tasa + INTO mtasa.ano,mtasa.mes,mtasa.ventas,clientes[i].tipo_cliente1 + FROM cgtb00084 a WHERE a.ano = mtasa.ano AND a.mes = mtasa.mes AND + a.ventas = mtasa.ventas AND a.tipo_cliente = clientes[i].tipo_cliente1 + + IF STATUS <> NOTFOUND THEN + DISPLAY BY NAME mtasa.* + UPDATE cgtb00084 SET cgtb00084.tasa = mtasa.tasa, + us_mod = usuarios, + fech_mod = getdate() + WHERE cgtb00084.ano = mtasa.ano AND cgtb00084.mes = mtasa.mes AND + cgtb00084.ventas = mtasa.ventas AND + cgtb00084.tipo_cliente = clientes[i].tipo_cliente1 + ELSE + INSERT INTO cgtb00084 (ano,mes,ventas,tipo_cliente,tasa,us_crea,fech_crea) VALUES + (mtasa.ano,mtasa.mes,mtasa.ventas,clientes[i].tipo_cliente1,mtasa.tasa,usuarios,getdate()) + END IF + + + # PARA LA BASE DE DATOS MARMOTECH + EXECUTE selecciona USING mtasa.ano,mtasa.mes,mtasa.ventas,clientes[i].tipo_cliente1 + + IF STATUS = NOTFOUND THEN + IF clientes[i].tipo_cliente1 IS NOT NULL THEN + EXECUTE adicionar USING mtasa.ano,mtasa.mes,clientes[i].tipo_cliente1,mtasa.ventas,mtasa.tasa + END IF + ELSE + EXECUTE actual USING mtasa.tasa,mtasa.ano,mtasa.mes,mtasa.ventas,clientes[i].tipo_cliente1 + END IF + + END IF + END FOR + LET pano = mtasa.ano + LET pmes = mtasa.mes + LET pventas = mtasa.ventas + LET ptasa = mtasa.tasa + LET preplica = replica + IF replica = "SI" THEN + CALL replicar() + END IF + CALL insertalog() + CALL fgl_winmessage("INFO","ACTUALIZACION EXITOSA","INFO") + END IF + END DISPLAY + + + ON ACTION CANCEL + CALL fgl_winmessage("INFO","OPERACION CANCELADA","INFO") + RETURN + + END DIALOG CLOSE WINDOW w1 END FUNCTION @@ -79,7 +143,7 @@ FUNCTION cventas() LET pventas = ui.combobox.forname("formonly.ventas") DECLARE bventas CURSOR FOR - SELECT a.ventas,a.descripcion FROM vetb00061 a + SELECT a.ventas,a.descripcion FROM vetb00060 a CALL pventas.clear() FOREACH bventas INTO kventas,dventas @@ -87,3 +151,37 @@ FUNCTION cventas() END FOREACH END FUNCTION + +FUNCTION replicar() + DEFINE replica,selecta,actualizacion STRING, + mes_falta,k,mesinsert INT + + + LET actualizacion = "UPDATE marmotech.dbo.cgtb00084 set tasa = ? WHERE ano = ? AND mes = ? AND ventas = ?" + PREPARE actualizacionxe FROM actualizacion + + LET selecta = "SELECT DISTINCT a.ano FROM marmotech.dbo.cgtb00084 a WHERE a.ano = ? AND a.mes = ? AND a.ventas = ?" + PREPARE selecciona FROM selecta + + LET replica = "INSERT INTO marmotech.dbo.cgtb00084 (ano,mes,ventas,tipo_cliente,tasa) + SELECT a.ano,?,a.ventas,a.tipo_cliente,a.tasa FROM cgtb00084 a WHERE a.ano = ? AND a.mes = ? AND a.ventas = ? " + PREPARE duplica FROM replica + + LET mes_falta = 12 - pmes + LET mesinsert = pmes + 1 + FOR k = 1 TO mes_falta + EXECUTE selecciona USING pano,mesinsert,pventas + IF STATUS = NOTFOUND THEN + EXECUTE duplica USING mesinsert,pano,pmes,pventas + ELSE + EXECUTE actualizacionxe USING ptasa,pano,mesinsert,pventas + END IF + LET mesinsert = mesinsert + 1 + END FOR + + +END FUNCTION +FUNCTION insertaLog() + + INSERT INTO cgtb00084_log VALUES (getdate(),usuarios,preplica) +END FUNCTION \ No newline at end of file diff --git a/PROYECTO/cgdir/edfmrp118.4fd b/PROYECTO/cgdir/edfmrp118.4fd index 2d10a72..3c45920 100644 --- a/PROYECTO/cgdir/edfmrp118.4fd +++ b/PROYECTO/cgdir/edfmrp118.4fd @@ -1,5 +1,5 @@ - + diff --git a/PROYECTO/cgdir/edprrp080.4gl b/PROYECTO/cgdir/edprrp080.4gl index 162fc10..6125c85 100644 --- a/PROYECTO/cgdir/edprrp080.4gl +++ b/PROYECTO/cgdir/edprrp080.4gl @@ -210,7 +210,9 @@ FUNCTION ipprrp004() " AND c.cod_n = e.cod_n and c.cod_grupo =e.cod_grupo AND c.cod_tipo = e.cod_tipo AND ", " c.cod_sec = e.cod_sec ", " AND e.cod_cia = f.cod_cia and c.cod_mov = k.cod_mov ", - " AND c.status_t is NULL and c.cod_mov = ", + #-> Excluye los movimientos que YA generaron su asiento en linea + # (ipprmt044 sella iptb00006.referenciaentrada). Evita doble contabilizacion. + " AND c.status_t is NULL AND c.referenciaentrada IS NULL and c.cod_mov = ", cod_mov, #" c.cod_mov = 44 ", # " AND c.departamento = 2407 ", "GROUP BY c.cod_mov,c.cod_n,c.cod_grupo,c.cod_tipo,c.cod_sec,e.descrip_esp,e.cod_cia,f.descripcion,c.departamento,x.nom_dpto, ", @@ -306,7 +308,8 @@ FUNCTION ipprrp004() LET acumulado.cuenta_gasto = acumulado_ac.cuenta_3 # LET acumulado.cuenta_imp_material = acumulado_ac.cuenta_imp_material LET acumulado.entrada_d = entrada_d - IF acumulado.cod_cia = 3 OR acumulado.cod_cia = 2 THEN + IF (acumulado.cod_cia = 3 OR acumulado.cod_cia = 2) + AND acumulado_ac.cuenta_imp_material IS NOT NULL THEN LET acumulado.cuenta_material = acumulado_ac.cuenta_imp_material LET acumulado.cuenta_imp_material = NULL END IF @@ -399,9 +402,11 @@ FUNCTION ipprrp004() LET acumulado.cuenta_imp_material = acumulado_ac.cuenta_imp_material LET acumulado.entrada_d = entrada_d - IF acumulado.cod_cia = 3 THEN + #-> Solo sustituye si el movimiento tiene cuenta_imp_material; si viene + # NULL (p.ej. mov 46 solo tiene cuenta_1) se perdia la partida de material + IF acumulado.cod_cia = 3 + AND acumulado.cuenta_imp_material IS NOT NULL THEN LET acumulado.cuenta_material = acumulado.cuenta_imp_material - END IF LET acumulado.cod_n = acumulado_ac.cod_n LET acumulado.cod_grupo = acumulado_ac.cod_grupo diff --git a/PROYECTO/cgdir/edprrp118.4gl b/PROYECTO/cgdir/edprrp118.4gl index 0d34cb5..524af98 100644 --- a/PROYECTO/cgdir/edprrp118.4gl +++ b/PROYECTO/cgdir/edprrp118.4gl @@ -33,8 +33,8 @@ FUNCTION irprrp009() DEFINE select_ac CHAR(1000) DEFINE c_ano CHAR(4) - DEFINE entra, nombre_mes CHAR(25) - DEFINE entra1 CHAR(5) + DEFINE nombre_mes CHAR(25) + DEFINE detalle CHAR(100) DEFINE numero_ent CHAR(2) DEFINE ano_act CHAR(4) @@ -159,8 +159,8 @@ FUNCTION irprrp009() CALL controlNumericoED( numero_ent, datos_cons.fech_fi, NULL) RETURNING entrada - - DISPLAY BY NAME entrada + LET entra = entrada + DISPLAY BY NAME entra AFTER INPUT @@ -204,7 +204,9 @@ FUNCTION irprrp009() "irtb00005 AS c ON b.cod_mov = c.cod_mov LEFT OUTER JOIN ", "adtb00001 AS d ON b.sec_a = d.departamento ", "WHERE ", - " b.fecha BETWEEN ? AND ? AND b.status_t IS NULL ", + #-> Excluye los movimientos que YA generaron su asiento en linea + # (irprmt036 sella irtb00006.referenciaentrada). Evita doble contabilizacion. + " b.fecha BETWEEN ? AND ? AND b.status_t IS NULL AND b.referenciaentrada IS NULL ", " GROUP BY b.cod_n,b.cod_grupo,b.cod_tipo,b.cod_sec,a.descrip_esp,a.unidad_med,b.cod_mov,c.descrip_mov,b.sec_a,d.nom_dpto, a.cuenta,e.cuenta_no ", " ORDER BY b.cod_mov,b.sec_a,b.cod_n,b.cod_grupo,b.cod_tipo,b.cod_sec" diff --git a/PROYECTO/ipdir/ipprrp013.4gl b/PROYECTO/ipdir/ipprrp013.4gl index f193a07..9bc72e3 100644 --- a/PROYECTO/ipdir/ipprrp013.4gl +++ b/PROYECTO/ipdir/ipprrp013.4gl @@ -629,7 +629,7 @@ REPORT estadistica(x,dias2,c_dias) FORMAT FIRST PAGE HEADER LET hora = time - LET fecha = today + LET fecha = today LET total_registros = 0 LET tcantidad = 0 LET fecha_v = NULL @@ -653,14 +653,14 @@ REPORT estadistica(x,dias2,c_dias) # BUSCA ULTIMA FECHA DE COMPRA Y VENTA DEL PRODUCTO LET fecha_v = NULL - SELECT convert(char(10),MAX(a.fecha_factura),103) INTO fecha_v + SELECT MAX(a.fecha_factura) INTO fecha_v FROM vetb00003 d,vetb00002 a WHERE d.factura = a.factura AND d.cod_n=x.cod_n AND d.cod_grupo=x.cod_grupo AND d.cod_tipo = x.cod_tipo AND d.cod_sec = x.cod_sec AND a.status_t is NULL LET fecha_oc = NULL - SELECT ISNULL(convert(char(10),MAX(a.fech_oc),103)," ") INTO fecha_oc + SELECT MAX(a.fech_oc) INTO fecha_oc FROM cotb00015 d,cotb00014 a WHERE d.num_oc = a.num_oc AND d.cod_n=x.cod_n AND d.cod_grupo=x.cod_grupo AND diff --git a/PROYECTO/ipdir/ipprrp013.4rp b/PROYECTO/ipdir/ipprrp013.4rp index cf4e3e4..3784afc 100644 --- a/PROYECTO/ipdir/ipprrp013.4rp +++ b/PROYECTO/ipdir/ipprrp013.4rp @@ -1,5 +1,5 @@ - + @@ -8,22 +8,26 @@ + - - + + - + + - - + + + + @@ -43,35 +47,33 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + diff --git a/PROYECTO/ipdir/ipprrp014.4gl b/PROYECTO/ipdir/ipprrp014.4gl index aaf80b2..ffc0c7c 100644 --- a/PROYECTO/ipdir/ipprrp014.4gl +++ b/PROYECTO/ipdir/ipprrp014.4gl @@ -155,6 +155,7 @@ FUNCTION ipprrp013() OPEN FORM ipfmrp014 FROM "ipfmrp014" DISPLAY FORM ipfmrp014 + CALL ui.Window.getCurrent().setText("Dias de Inventarios Gerente Marcas") DISPLAY "ipprrp014" AT 4, 3 ATTRIBUTE(RED) DISPLAY "Dias de Inventarios Gerente Marcas" AT 6, 33 ATTRIBUTE(BLACK) @@ -282,8 +283,8 @@ FUNCTION ipprrp013() LET select_bal = "SELECT a.cod_n, a.cod_grupo, a.cod_tipo, a.cod_sec, a.descrip_esp,", " a.unidad_med, '0', d.descripcion, ' ', x.cod_categoria, x.descripcion,", - " convert(char(10), uv.fecha_v, 103),", - " convert(char(10), uc.fecha_oc, 103),", + " uv.fecha_v,", + " uc.fecha_oc,", " ISNULL(uc.tcantidad, 0)", " FROM iptb00002 a", " INNER JOIN iptb00035 x1 ON a.cod_n = x1.cod_n", diff --git a/PROYECTO/ipdir/ipprrp014.4rp b/PROYECTO/ipdir/ipprrp014.4rp new file mode 100644 index 0000000..1ef56ed --- /dev/null +++ b/PROYECTO/ipdir/ipprrp014.4rp @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PROYECTO/ipdir/ipprrp046.4gl b/PROYECTO/ipdir/ipprrp046.4gl index a616398..8c8e3a6 100644 --- a/PROYECTO/ipdir/ipprrp046.4gl +++ b/PROYECTO/ipdir/ipprrp046.4gl @@ -53,6 +53,7 @@ FUNCTION ipprrp046() OPEN FORM ipfmrp046 FROM "ipfmrp046" DISPLAY FORM ipfmrp046 + CALL ui.Window.getCurrent().setText("Relacion de Documentos") # CALL pantalla() DISPLAY "ipprrp046" AT 4,3 ATTRIBUTE(RED) DISPLAY " Relacion de Documentos" AT 6,22 ATTRIBUTE(BLACK) @@ -110,8 +111,8 @@ END INPUT DISPLAY "<< Reporte Generandose ... Por Favor Espere. >>" AT 19,14 ATTRIBUTE (REVERSE) - CALL seleccionarsalida() RETURNING r_output - CALL configureoutput(r_output) RETURNING handler + CALL selectOutputSimple() RETURNING r_output + LET handler = configurarSalidaClasica(r_output) START REPORT relacion TO XML HANDLER handler @@ -241,3 +242,16 @@ END FUNCTION ON LAST ROW END REPORT + +FUNCTION configurarSalidaClasica(tipo_file) + DEFINE tipo_file CHAR(3) + IF NOT fgl_report_loadCurrentSettings(NULL) THEN + RETURN NULL + END IF + CALL fgl_report_setPageMargins("0.5cm", "0.5cm", "0.5cm", "0.5cm") + CALL fgl_report_configureCompatibilityOutput(160,"Monospaced",NULL,NULL,NULL,NULL) + CALL fgl_report_selectDevice(tipo_file) + CALL fgl_report_configurexlsxdevice(NULL, NULL, NULL, FALSE, FALSE, NULL, 1) + CALL fgl_report_selectPreview(TRUE) + RETURN fgl_report_commitCurrentSettings() +END FUNCTION diff --git a/PROYECTO/ipdir/ipprrp053.4gl b/PROYECTO/ipdir/ipprrp053.4gl index d0bc967..793407e 100644 --- a/PROYECTO/ipdir/ipprrp053.4gl +++ b/PROYECTO/ipdir/ipprrp053.4gl @@ -43,6 +43,7 @@ FUNCTION ipprrp053() OPEN FORM ipfmrp053 FROM "ipfmrp053" DISPLAY FORM ipfmrp053 + CALL ui.Window.getCurrent().setText("Informe Transacciones Inventarios") INPUT BY NAME fecha1, fecha2 @@ -112,7 +113,7 @@ FUNCTION ipprrp053() LET r_filename = "ipprrp053.4rp" IF fgl_report_loadCurrentSettings(r_filename) THEN LET preview = 1 - CALL selectoutput() RETURNING r_output + CALL selectOutputSimple() RETURNING r_output CALL fgl_report_selectDevice(r_output) CALL fgl_report_selectPreview(preview) LET handler = fgl_report_commitCurrentSettings() diff --git a/PROYECTO/ipdir/ipprrp053.4rp b/PROYECTO/ipdir/ipprrp053.4rp new file mode 100644 index 0000000..815a3fd --- /dev/null +++ b/PROYECTO/ipdir/ipprrp053.4rp @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PROYECTO/irdir/desglose_conteo.4gl b/PROYECTO/irdir/desglose_conteo.4gl new file mode 100644 index 0000000..4276ea5 --- /dev/null +++ b/PROYECTO/irdir/desglose_conteo.4gl @@ -0,0 +1,128 @@ +DEFINE curr,i INT, + + kdatos DYNAMIC ARRAY OF RECORD + bookmash VARCHAR(50), + tipos VARCHAR(50), + lado_1 DEC(8,2), + lado_2 DEC(8,2), + lado_3 DEC(8,2), + cantidad SMALLINT, + cantidad2 FLOAT, + tono,calidad VARCHAR(100), + xobservacion VARCHAR(200), + id_producto CHAR(25), + bodega INT, + seccion INT, + tramo INT, + codid,idrow,idtrx INT + + END RECORD, + xcodid,xbodega,xseccion,xtramo,xcodn,xcodgrupo,xcodtipo,xcodsec,kidtrx INT, + xfecha DATE, + totalmedida DEC(12,5) +FUNCTION desglose_conteo(pcodid,pfecha,pbodega,pseccion,ptramo,pcodn,pcodgrupo,pcodtipo,pcodsec,descripcion,idtrx) + DEFINE pcodid,pbodega,pseccion,ptramo,pcodn,pcodgrupo,pcodtipo,pcodsec,idtrx INT,pfecha DATE, + descripcion VARCHAR(100) + + LET xcodid = pcodid + LET xbodega = pbodega + LET xseccion = pseccion + LET xtramo = ptramo + LET xfecha = pfecha + + LET xcodn = pcodn + LET xcodgrupo = pcodgrupo + LET xcodtipo = pcodtipo + LET xcodsec = pcodsec + LET kidtrx = idtrx + + CALL kdatos.clear() + + CALL busca_detalle() + OPEN WINDOW w1 WITH FORM "irfmwd015" + DISPLAY BY NAME pcodn,pcodgrupo,pcodtipo,pcodsec,descripcion + INPUT ARRAY kdatos FROM sdatos.* ATTRIBUTES(WITHOUT DEFAULTS) + BEFORE INPUT + LET curr = arr_curr() + LET totalmedida =0 + LET kdatos[curr].cantidad2 =0 + CALL bodegas('1') + CALL cseccion(kdatos[curr].bodega) + CALL ctramo(kdatos[curr].bodega,kdatos[curr].seccion) + AFTER FIELD cantidad + IF kdatos[arr_curr()].cantidad IS NOT NULL THEN + IF kdatos[arr_curr()].lado_1 IS NOT NULL THEN + LET kdatos[arr_curr()].cantidad2 =kdatos[arr_curr()].lado_1 *kdatos[arr_curr()].cantidad + END IF + IF kdatos[arr_curr()].lado_2 IS NOT NULL THEN + LET kdatos[arr_curr()].cantidad2 =kdatos[arr_curr()].lado_1 * kdatos[arr_curr()].lado_2* kdatos[arr_curr()].cantidad + END IF + IF kdatos[arr_curr()].lado_3 IS NOT NULL THEN + LET kdatos[arr_curr()].cantidad2 =kdatos[arr_curr()].cantidad2* kdatos[arr_curr()].lado_3* kdatos[arr_curr()].cantidad + END IF + DISPLAY kdatos[arr_curr()].cantidad2 TO sdatos[scr_line()].cantidad2 + LET totalmedida = totalmedida + kdatos[arr_curr()].cantidad2 + DISPLAY BY NAME totalmedida + END IF + AFTER INPUT + IF int_flag THEN + LET int_flag = FALSE + CALL msg(2) + END IF + LET totalmedida =0 + FOR i =1 to kdatos.getLength() + IF kdatos[i].cantidad IS NOT NULL THEN + IF kdatos[i].lado_1 IS NOT NULL THEN + LET kdatos[i].cantidad2 =kdatos[i].lado_1 *kdatos[i].cantidad + END IF + IF kdatos[i].lado_2 IS NOT NULL THEN + LET kdatos[i].cantidad2 =kdatos[i].lado_1 * kdatos[i].lado_2* kdatos[i].cantidad + END IF + IF kdatos[i].lado_3 IS NOT NULL THEN + LET kdatos[i].cantidad2 =kdatos[i].cantidad2* kdatos[i].lado_3 + END IF + LET totalmedida = totalmedida + kdatos[i].cantidad2 + END IF + + END FOR + EXIT INPUT + ON ACTION salvar ATTRIBUTE(TEXT="Guardar",IMAGE="fa-save") + CALL guarda_info() + END INPUT + CLOSE WINDOW w1 + RETURN totalmedida +END FUNCTION +FUNCTION busca_detalle() + DECLARE busca_desglose CURSOR FOR + SELECT a.book,a.tipos,a.lado_1,a.lado_2,a.lado_3,a.cantidad,a.cantidad2,a.tono,a.calidad, + a.observacion, + a.idproducto,a.bodega,a.cod_seccion,a.cod_tramo,a.codid, a.idrow,a.idtrx + FROM iptb00062 a WHERE a.codid = xcodid AND a.fecha = xfecha + ORDER BY a.lado_1 + + LET i = 1 + FOREACH busca_desglose INTO kdatos[i].* + + LET i = i + 1 + END FOREACH +END FUNCTION +FUNCTION guarda_info() + BEGIN WORK + + DELETE FROM iptb00062 WHERE fecha = xfecha AND bodega = xbodega AND codid = xcodid + + FOR i = 1 TO kdatos.getLength() + IF kdatos[i].cantidad2 IS NOT NULL THEN + INSERT INTO iptb00062 (codid,cod_n,cod_grupo,cod_tipo,cod_Sec,cantidad,cantidad2,lado_1,lado_2,lado_3, + book,tipos,cod_seccion,cod_tramo,bodega,us_crea,fech_crea,idproducto,idtrx,tono,calidad,fecha, + observacion) + VALUES (kdatos[i].codid,xcodn,xcodgrupo,xcodtipo,xcodsec,kdatos[i].cantidad,kdatos[i].cantidad2, + kdatos[i].lado_1,kdatos[i].lado_2,kdatos[i].lado_3,kdatos[i].bookmash,kdatos[i].tipos, + kdatos[i].seccion,kdatos[i].tramo,kdatos[i].bodega,suser_sname(),getdate(), + kdatos[i].id_producto,kidtrx,kdatos[i].tono,kdatos[i].calidad,xfecha, + kdatos[i].xobservacion) + END IF + END FOR + COMMIT WORK + CALL msg(1) +END FUNCTION \ No newline at end of file diff --git a/PROYECTO/irdir/imprequisicion.4gl b/PROYECTO/irdir/imprequisicion.4gl new file mode 100644 index 0000000..4d2d46f --- /dev/null +++ b/PROYECTO/irdir/imprequisicion.4gl @@ -0,0 +1,165 @@ +GLOBALS "irprgb000.4gl" + DEFINE xcodigo VARCHAR(50) + DEFINE despiece1 DYNAMIC ARRAY OF RECORD + id_etiqueta SMALLINT, + cod_n SMALLINT, + cod_grupo SMALLINT, + cod_tipo SMALLINT, + cod_sec SMALLINT, + lado_1 DEC(12,5), + lado_2 DEC(12,5), + lado_3 DEC(12,5), + cantidad DEC(12,5), + medida DEC(12,5), + secuencia,id_despiece INT, + bodega SMALLINT + + END RECORD + DEFINE vendedor VARCHAR(100) + +FUNCTION impdocumentos(numeroid,codmov) + DEFINE numeroid,codmov INT + + CALL buscadoc(numeroid,codmov) + + LET r_filename = "irprmt020.4rp" + iF fgl_report_loadCurrentSettings(r_filename) THEN -- load the .4rp file + + LET r_output="PDF" + LET preview=1 + CALL fgl_report_selectDevice(r_output) -- changing default + CALL fgl_report_selectPreview(preview) -- changing default + LET handler = fgl_report_commitCurrentSettings() -- commit changes + ELSE + RETURN + END IF + + START REPORT requiere TO XML HANDLER HANDLER + + FOR idx = 1 TO arr_irtb58.getLength() + IF arr_irtb58[idx].cod_Sec IS NOT NULL THEN + LET xcodigo =arr_irtb58[idx].cod_n USING '&&&&&','-', + arr_irtb58[idx].cod_grupo USING '&&&&&','-', + arr_irtb58[idx].cod_tipo USING '&&&&&&','-', + arr_irtb58[idx].cod_sec USING '&&&&&&&' + + DISPLAY arr_irtb58[idx].* + DISPLAY xcodigo + + OUTPUT TO REPORT requiere(arr_irtb58[idx].*,despiece[idx].*, xcodigo) + + END IF + + END FOR + FINISH REPORT requiere + LET tienedespiece = FALSE +END FUNCTION + +REPORT requiere(detalle,xdespiece,codigo) + DEFINE hora STRING, + detalle RECORD + area INT, + cod_n,cod_grupo,cod_tipo,cod_sec INT, + descripcion VARCHAR(100), + unidad_med VARCHAR(4), + cantidad_1,cantidad,cantidad_o1,cantidad1,factor_conv DEC(12,5) + END RECORD, + xdespiece RECORD + id_etiqueta SMALLINT, + cod_n SMALLINT, + cod_grupo SMALLINT, + cod_tipo SMALLINT, + cod_sec SMALLINT, + lado_1 DEC(12,5), + lado_2 DEC(12,5), + lado_3 DEC(12,5), + cantidad DEC(12,5), + medida DEC(12,5), + secuencia,id_despiece INT, + bodega SMALLINT + + END RECORD, + codigo VARCHAR(50), + + x INT, + etiqueta VARCHAR(100) + + ORDER BY codigo + FORMAT + FIRST PAGE HEADER + SELECT a.nombre INTO p_companias.nombre FROM companias a + LET hora = CURRENT + PRINTX hora,p_companias.nombre + BEFORE GROUP OF codigo + PRINTX detalle.*,p_irtb57.*, + nombreMov,nombreBodega,nombreBodegaDestino,nombreUsuario + + ON EVERY ROW + SELECT a.descripcion INTO etiqueta FROM vetb00026 a + WHERE a.codid = xdespiece.id_etiqueta + + + LET total_cantidad = total_cantidad + xdespiece.cantidad + + PRINTX codigo,xdespiece.*,tienedespiece,etiqueta,total_cantidad,total_medida +END REPORT + +FUNCTION buscadoc(numid,codmov) + DEFINE numid,codmov INT + + LET vendedor = null + SELECT a.numero_Doc,a.cod_mov,a.fecha,a.num_oc,a.tipo_cliente,a.sec_cliente,a.nombre,a.bodega,a.bodega_destino, + a.estado,a.url_destino,a.observacion,b.descrip_mov,c.descripcion, + '('||ISNULL(CAST(f.num_emp AS VARCHAR(10)),' ')||')'||ISNULL(rtrim(f.nom1_emp),' ')||' '||ISNULL(f.apell1_emp,' ') + + INTO p_irtb57.numero_doc,p_irtb57.cod_mov,p_irtb57.fecha,p_irtb57.num_oc,p_irtb57.tipo_cliente,p_irtb57.sec_cliente, + p_irtb57.cliente,p_irtb57.bodega,p_irtb57.bodega_destino,p_irtb57.estado, + p_irtb57.url_file,p_irtb57.observacion,nombreMov,nombreBodega,vendedor + FROM irtb00057 a INNER JOIN irtb00005 b ON b.cod_mov = a.cod_mov + INNER JOIN intb00009 c ON c.cod_bodega = a.bodega + LEFT OUTER JOIN prtb00012 d ON d.num_oc = a.num_oc + LEFT OUTER JOIN adtb00003 f ON f.num_emp = d.sec_vend + WHERE a.numero_doc = numid AND a.cod_mov = codmov + #BODEGA DESTINO + IF p_irtb57.bodega_destino IS NOT NULL THEN + SELECT a.descripcion INTO nombreBodegaDestino FROM intb00009 a WHERE a.cod_bodega = p_irtb57.bodega_destino + END IF + DECLARE buscardetalle CURSOR FOR + SELECT a.area,a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec,a.descripcion,a.unidad_med, + a.cantidad_1,a.cantidad_2, + c.id_etiqueta, + c.lado_1,c.lado_2,c.lado_3,c.cantidad,c.medida + FROM irtb00058 a + LEFT OUTER JOIN irtb00060 c ON c.cod_n =a.cod_n AND c.cod_grupo = a.cod_grupo AND + c.cod_tipo = a.cod_tipo AND c.cod_sec = a.cod_Sec AND + c.id_despiece = a.numero_Doc + WHERE a.numero_Doc = numid AND a.cod_mov = codmov + + LET idx = 1 + CALL arr_irtb58.clear() + LET tienedespiece = FALSE + FOREACH buscardetalle INTO arr_irtb58[idx].area, + arr_irtb58[idx].cod_n, + arr_irtb58[idx].cod_grupo, + arr_irtb58[idx].cod_tipo, + arr_irtb58[idx].cod_sec, + arr_irtb58[idx].descripcion, + arr_irtb58[idx].unidad_med, + arr_irtb58[idx].cantidad_1, + arr_irtb58[idx].cantidad, + #arr_irtb58[idx].factor_conv, + despiece1[idx].id_etiqueta, + despiece1[idx].lado_1, + despiece1[idx].lado_2, + despiece1[idx].lado_3, + despiece1[idx].cantidad, + despiece1[idx].medida + IF despiece1[idx].cantidad > 0 THEN + LET tienedespiece = TRUE + ELSE + LET tienedespiece = FALSE + END IF + + LET idx = idx + 1 + END FOREACH +END FUNCTION \ No newline at end of file diff --git a/PROYECTO/irdir/irautorizareq.4fd b/PROYECTO/irdir/irautorizareq.4fd new file mode 100644 index 0000000..96a4a80 --- /dev/null +++ b/PROYECTO/irdir/irautorizareq.4fd @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+
+ + + + + \ No newline at end of file diff --git a/PROYECTO/irdir/irautorizareq.4gl b/PROYECTO/irdir/irautorizareq.4gl new file mode 100644 index 0000000..8a1e136 --- /dev/null +++ b/PROYECTO/irdir/irautorizareq.4gl @@ -0,0 +1,438 @@ +{ + PROGRAMA: irautorizareq + OBJETIVO: Mostrar al usuario las requisiciones autorizadas + FECHA : Mayo 9, 2022 +} + +GLOBALS "irprgb000.4gl" +DEFINE + r INT, + arr_busqueda1 DYNAMIC ARRAY OF RECORD + procesar VARCHAR(3), + estado VARCHAR(20), + idestado INT, + num_oc INT, + tipo_documento VARCHAR(100), + numeroid INT, + fecha DATE, + nombre, observacion1, origen, destino, usuario VARCHAR(100), + vendedor VARCHAR(100), + archivo VARCHAR(200), + cod_mov1 INT, + us_crea VARCHAR(50), + rtipo_cliente, rsec_cliente, bodega, bodega_destino INT + + END RECORD, + nombreusuario, email, vendedor VARCHAR(100), + tienedespiece BOOLEAN, + cuentaimp INT + +DEFINE despiece1 DYNAMIC ARRAY OF RECORD + id_etiqueta SMALLINT, + cod_n SMALLINT, + cod_grupo SMALLINT, + cod_tipo SMALLINT, + cod_sec SMALLINT, + lado_1 DEC(12, 5), + lado_2 DEC(12, 5), + lado_3 DEC(12, 5), + cantidad DEC(12, 5), + medida DEC(12, 5), + secuencia, id_despiece INT, + bodega SMALLINT + +END RECORD + +DEFINE curr INT + +FUNCTION irautorizadas(xusuario) + DEFINE + data RECORD + rnumeroDoc, + rcodMov, + rtipo_cliente, + num_oc, + tipo_cliente, + sec_cliente, + bodega, + bodega_destino + INT, + nombre VARCHAR(100) + END RECORD, + xusuario VARCHAR(50) + + CALL arr_busqueda1.clear() + INITIALIZE curr TO NULL + + CALL buscadataReq(xusuario) + IF r = 1 THEN + RETURN data.* + END IF + OPEN WINDOW w1 WITH FORM "irautorizareq" + + INPUT ARRAY arr_busqueda1 + FROM sbusqueda.* + ATTRIBUTE(WITHOUT DEFAULTS, UNBUFFERED) + BEFORE INPUT + DISPLAY 'REQUISICIONES TRANSACCIONES AUTORIZADAS' TO etiqueta + CALL DIALOG.setActionActive("accept", FALSE) + { BEFORE ROW + LET r = arr_curr() + IF arr_busqueda1[r].archivo IS NULL THEN + CALL DIALOG.setActionActive( "tfile", FALSE ) + ELSE + CALL DIALOG.setActionActive( "tfile", TRUE ) + END IF} + CALL estadosprocesos(1) + ON ACTION tfile + LET r = arr_curr() + + IF arr_busqueda1[r].archivo IS NOT NULL THEN + CALL ui.Interface.frontCall( + "standard", "launchURL", [arr_busqueda1[r].archivo], []) + END IF + ON ACTION imprimir ATTRIBUTE(TEXT = "Imprimir", IMAGE = "printer") + IF arr_busqueda1[arr_curr()].numeroid > 0 THEN + CALL buscadoc( + arr_busqueda1[arr_curr()].numeroid, + arr_busqueda1[arr_curr()].cod_mov1) + LET data.rnumeroDoc = arr_busqueda1[arr_curr()].numeroid + LET data.rcodMov = arr_busqueda1[arr_curr()].cod_mov1 + LET data.rtipo_cliente = arr_busqueda1[arr_curr()].rtipo_cliente + LET data.sec_cliente = arr_busqueda1[arr_curr()].rsec_cliente + LET data.nombre = arr_busqueda1[arr_curr()].nombre + LET data.num_oc = arr_busqueda1[arr_curr()].num_oc + LET data.bodega = arr_busqueda1[arr_curr()].bodega + LET data.bodega_destino = + arr_busqueda1[arr_curr()].bodega_destino + LET nombreUsuario = arr_busqueda1[arr_curr()].usuario + + DISPLAY data.* + DISPLAY nombreUsuario + + CALL impdocumento() + END IF + ON ACTION procesar ATTRIBUTE(TEXT = "Procesa", IMAGE = "") + LET curr = arr_curr() + + IF arr_busqueda1[curr].numeroid > 0 THEN + LET data.rnumeroDoc = arr_busqueda1[curr].numeroid + LET data.rcodMov = arr_busqueda1[curr].cod_mov1 + LET data.rtipo_cliente = arr_busqueda1[curr].rtipo_cliente + LET data.sec_cliente = arr_busqueda1[curr].rsec_cliente + LET data.nombre = arr_busqueda1[curr].nombre + LET data.num_oc = arr_busqueda1[curr].num_oc + LET data.bodega = arr_busqueda1[curr].bodega + LET data.bodega_destino = arr_busqueda1[curr].bodega_destino + EXIT INPUT + END IF + + ON CHANGE observacion1 + IF arr_busqueda1[arr_curr()].numeroid > 0 THEN + UPDATE irtb00057 + SET observacion = arr_busqueda1[arr_curr()].observacion1, + us_mod = usuarios, + fech_mod = getdate() + WHERE numero_doc = arr_busqueda1[arr_curr()].numeroid + END IF + ON CHANGE idestado + IF arr_busqueda1[arr_curr()].numeroid > 0 THEN + UPDATE irtb00057 + SET idestado = arr_busqueda1[arr_curr()].idestado, + observacion = arr_busqueda1[arr_curr()].observacion1, + us_mod = usuarios, + fech_mod = getdate() + WHERE numero_doc = arr_busqueda1[arr_curr()].numeroid + END IF + AFTER INPUT + IF int_flag THEN + LET data.rnumeroDoc = NULL + LET data.rcodMov = NULL + LET data.rtipo_cliente = NULL + LET data.sec_cliente = NULL + LET data.nombre = NULL + LET data.num_oc = NULL + LET data.bodega = NULL + LET data.bodega_destino = NULL + + LET int_flag = FALSE + END IF + EXIT INPUT + END INPUT + + CLOSE WINDOW w1 + RETURN data.* +END FUNCTION +FUNCTION buscadataReq(pusuario) + DEFINE pusuario VARCHAR(50) + + DECLARE buscar CURSOR FOR + SELECT ' ', + b.estado, + b.idestado, + b.num_oc, + CAST(a.cod_mov AS VARCHAR(10)) || ' ' || a.descrip_mov, + b.numero_doc, + b.fecha, + '', + b.observacion, + (SELECT p1.descripcion + FROM intb00009 p1 + WHERE p1.cod_bodega = b.bodega) + AS ORIGEN, + (SELECT p2.descripcion + FROM intb00009 p2 + WHERE p2.cod_bodega = b.bodega_destino), + ' ', + ' ' + , + b.url_destino, + b.cod_mov, + b.us_crea, + '0', + '0', + b.bodega, + b.bodega_destino + FROM irtb00005 a, + irtb00057 b + INNER + JOIN irtb00048 d + ON d.bodega = b.bodega AND d.usuario = pusuario + WHERE a.cod_mov = b.cod_mov + AND b.estado = 'AUTORIZADA' + AND b.status_t IS NULL + + LET r = 1 + CALL arr_busqueda1.clear() + FOREACH buscar INTO arr_busqueda1[r].* + + CALL usuarioSistema( + arr_busqueda1[r].us_crea) + RETURNING nombreUsuario, email + + LET arr_busqueda1[r].usuario = nombreUsuario + LET r = r + 1 + END FOREACH + +END FUNCTION + +FUNCTION buscadoc(numid, codmov) + DEFINE numid, codmov INT + + LET vendedor = NULL + SELECT a.numero_Doc, + a.cod_mov, + a.fecha, + a.num_oc, + a.tipo_cliente, + a.sec_cliente, + a.nombre, + a.bodega, + a.bodega_destino, + a.estado, + a.url_destino, + a.observacion, + b.descrip_mov, + c.descripcion + INTO p_irtb57.numero_doc, + p_irtb57.cod_mov, + p_irtb57.fecha, + p_irtb57.num_oc, + p_irtb57.tipo_cliente, + p_irtb57.sec_cliente, + p_irtb57.cliente, + p_irtb57.bodega, + p_irtb57.bodega_destino, + p_irtb57.estado, + p_irtb57.url_file, + p_irtb57.observacion, + nombreMov, + nombreBodega + FROM irtb00057 a INNER JOIN irtb00005 b ON b.cod_mov = a.cod_mov + INNER + JOIN intb00009 c + ON c.cod_bodega = a.bodega + #-> Se eliminaron los JOIN a prtb00012 y adtb00003: una requisicion de + # REPUESTOS no puede tener orden de pedido de cliente ni nada de ventas, + # y el join por sec_vend rompia la consulta (-4104 f.sec_vend). + WHERE a.numero_doc = numid AND a.cod_mov = codmov + #BODEGA DESTINO + IF p_irtb57.bodega_destino IS NOT NULL THEN + SELECT a.descripcion + INTO nombreBodegaDestino + FROM intb00009 a + WHERE a.cod_bodega = p_irtb57.bodega_destino + END IF + DECLARE buscardetalle CURSOR FOR + SELECT a.area, + a.cod_n, + a.cod_grupo, + a.cod_tipo, + a.cod_sec, + a.descripcion, + a.unidad_med, + a.cantidad_1, + a.cantidad_2, + c.id_etiqueta, + c.lado_1, + c.lado_2, + c.lado_3, + c.cantidad, + c.medida + FROM irtb00058 a + LEFT OUTER + JOIN irtb00060 c + ON c.cod_n = a.cod_n + AND c.cod_grupo = a.cod_grupo + AND c.cod_tipo = a.cod_tipo + AND c.cod_sec = a.cod_Sec + AND c.id_despiece = a.numero_Doc + WHERE a.numero_Doc = numid AND a.cod_mov = codmov + + LET idx = 1 + CALL arr_irtb58.clear() + LET tienedespiece = FALSE + FOREACH buscardetalle + INTO arr_irtb58[idx].area, + arr_irtb58[idx].cod_n, + arr_irtb58[idx].cod_grupo, + arr_irtb58[idx].cod_tipo, + arr_irtb58[idx].cod_sec, + arr_irtb58[idx].descripcion, + arr_irtb58[idx].unidad_med, + arr_irtb58[idx].cantidad_1, + arr_irtb58[idx].cantidad, + #arr_irtb58[idx].factor_conv, + despiece1[idx].id_etiqueta, + despiece1[idx].lado_1, + despiece1[idx].lado_2, + despiece1[idx].lado_3, + despiece1[idx].cantidad, + despiece1[idx].medida + IF despiece1[idx].cantidad > 0 THEN + LET tienedespiece = TRUE + ELSE + LET tienedespiece = FALSE + END IF + + LET idx = idx + 1 + END FOREACH +END FUNCTION +FUNCTION impdocumento() + DEFINE + idx_l INT, + xcodigo VARCHAR(50) + LET r_filename = "irprmt020_1.4rp" + IF fgl_report_loadCurrentSettings(r_filename) THEN -- load the .4rp file + + LET r_output = "PDF" + LET preview = 1 + CALL fgl_report_selectDevice(r_output) -- changing default + CALL fgl_report_selectPreview(preview) -- changing default + LET handler = fgl_report_commitCurrentSettings() -- commit changes + + ELSE + RETURN + END IF + START REPORT requiere TO XML HANDLER HANDLER + + FOR idx = 1 TO arr_irtb58.getLength() + + IF arr_irtb58[idx].cod_Sec IS NOT NULL THEN + LET xcodigo = + arr_irtb58[idx].cod_n USING '&&&&&', + '-', + arr_irtb58[idx].cod_grupo USING '&&&&&', + '-', + arr_irtb58[idx].cod_tipo USING '&&&&&&', + '-', + arr_irtb58[idx].cod_sec USING '&&&&&&&' + + OUTPUT TO REPORT requiere( + p_irtb57.*, arr_irtb58[idx].*, despiece1[idx].*, xcodigo) + + END IF + + END FOR + FINISH REPORT requiere +END FUNCTION + +REPORT requiere(x, detalle, xdespiece, codigo) + DEFINE + hora STRING, + detalle RECORD + area INT, + cod_n, cod_grupo, cod_tipo, cod_sec INT, + descripcion VARCHAR(100), + unidad_med VARCHAR(4), + cantidad_1, cantidad, cantidad_o1, cantidad1, factor_conv DEC(12, 5) + END RECORD, + xdespiece RECORD + id_etiqueta SMALLINT, + cod_n SMALLINT, + cod_grupo SMALLINT, + cod_tipo SMALLINT, + cod_sec SMALLINT, + lado_1 DEC(12, 5), + lado_2 DEC(12, 5), + lado_3 DEC(12, 5), + cantidad DEC(12, 5), + medida DEC(12, 5), + secuencia, id_despiece INT, + bodega SMALLINT + + END RECORD, + codigo VARCHAR(50), + x RECORD + numero_doc INT, + cod_mov SMALLINT, + fecha DATE, + num_oc INT, + orden_trabajo INT, + observacion VARCHAR(200), + tipo_cliente SMALLINT, + sec_cliente INT, + cliente VARCHAR(100), + bodega SMALLINT, + bodega_destino SMALLINT, + estado VARCHAR(50), + ruta_documento, url_file VARCHAR(250), + idstado VARCHAR(60) + END RECORD, + + etiqueta VARCHAR(100), + total_cantidad, total_medida DEC(12, 5) + + ORDER BY codigo + FORMAT + FIRST PAGE HEADER + SELECT a.nombre INTO p_companias.nombre FROM companias a + LET hora = CURRENT + + PRINTX p_companias.nombre, + hora, + x.*, + nombreMov, + nombreBodega, + nombreBodegaDestino, + nombreUsuario, + vendedor + BEFORE GROUP OF codigo + PRINTX dEtalle.* + + ON EVERY ROW + SELECT a.descripcion + INTO etiqueta + FROM vetb00026 a + WHERE a.codid = xdespiece.id_etiqueta + + LET total_cantidad = total_cantidad + xdespiece.cantidad + + PRINTX codigo, + xdespiece.*, + tienedespiece, + etiqueta, + total_cantidad, + total_medida + +END REPORT diff --git a/PROYECTO/irdir/irbuscaprod.4gl b/PROYECTO/irdir/irbuscaprod.4gl new file mode 100644 index 0000000..efd0c6c --- /dev/null +++ b/PROYECTO/irdir/irbuscaprod.4gl @@ -0,0 +1,103 @@ +#----------------------------------------------------------------------------- +# irbuscaprod.4gl +# busca_prod() tomada de PROYECTOS/otrodir/funciones.4gl (3.20), que es la que +# enlazaba irprmt020. Va aparte porque funciones_ip.4gl redefine bodegas() +# y disponibles(), ya presentes en la libreria FUNCIONES. +#----------------------------------------------------------------------------- +FUNCTION busca_prod(pinventario) + + DEFINE + arr_prod DYNAMIC ARRAY OF RECORD + cod_n INTEGER, + cod_grupo INTEGER, + cod_tipo INTEGER, + cod_sec INTEGER, + descrip_esp CHAR(50), + unidad_med CHAR(4), + existencia1 DEC(18, 4), + cantidad_o DEC(18, 4), + cantidad_c DEC(18, 4), + existencia DEC(18, 4) + END RECORD, + selec_pt, criterio STRING, + f, pinventario, idx SMALLINT, + pcodn, pcodgrupo, pcodtipo, pcodsec INT, + pdescripcion CHAR(100) + + OPEN WINDOW busca_2 + AT 8, 4 + WITH FORM "vefmwd100" + ATTRIBUTE(BORDER, FORM LINE FIRST + 1, PROMPT LINE LAST) + + CONSTRUCT criterio + ON a.cod_n, a.cod_grupo, a.cod_tipo, a.descrip_esp + FROM cod_n, cod_grupo, cod_tipo, descrip_esp + + IF pinventario = '02' THEN + LET selec_pt = + "SELECT a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec,a.descrip_esp,a.unidad_med,SUM(b.cantidad_2),'0','0',SUM(b.cantidad_2) ", + " FROM iptb00002 AS a INNER JOIN iptb00001 AS c ON a.cod_n = c.cod_n AND a.cod_grupo = c.cod_grupo AND ", + " a.cod_tipo = c.cod_tipo and a.cod_Sec = c.cod_Sec LEFT OUTER JOIN ", + " iptb00006 AS b ON a.cod_n = b.cod_n AND a.cod_grupo = b.cod_grupo AND ", + " a.cod_tipo = b.cod_tipo AND a.cod_sec = b.cod_sec AND b.status_t IS NULL ", + " WHERE a.status_t IS NULL AND ", + CRITERIO CLIPPED, + " GROUP BY a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec,a.descrip_esp,a.unidad_med ", + " ORDER BY a.descrip_esp " + END IF + + IF pinventario = '01' THEN + LET selec_pt = + "SELECT a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec,a.descrip_esp,a.unidad_med,'0','0','0',SUM(b.cantidad_2) ", + " FROM intb00001 AS a ", + " LEFT OUTER JOIN ", + " intb00006 AS b ON a.cod_n = b.cod_n AND a.cod_grupo = b.cod_grupo AND ", + " a.cod_tipo = b.cod_tipo AND a.cod_sec = b.cod_sec AND b.status_t IS NULL ", + " WHERE a.status_t IS NULL AND ", + CRITERIO CLIPPED, + " GROUP BY a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec,a.descrip_esp,a.unidad_med ", + " ORDER BY a.descrip_esp " + END IF + + IF pinventario = '03' THEN + LET selec_pt = + "SELECT a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec,a.descrip_esp,a.unidad_med,'0','0','0',SUM(b.cantidad_2) ", + " FROM irtb00002 AS a ", + " LEFT OUTER JOIN ", + " irtb00006 AS b ON a.cod_n = b.cod_n AND a.cod_grupo = b.cod_grupo AND ", + " a.cod_tipo = b.cod_tipo AND a.cod_sec = b.cod_sec AND b.status_t IS NULL ", + " WHERE a.status_t IS NULL AND ", + CRITERIO CLIPPED, + " GROUP BY a.cod_n,a.cod_grupo,a.cod_tipo,a.cod_sec,a.descrip_esp,a.unidad_med ", + " ORDER BY a.descrip_esp " + END IF + + IF int_flag THEN + LET Int_flag = FALSE + CLOSE WINDOW busca_2 + RETURN pcodn, pcodgrupo, pcodtipo, pcodsec, pdescripcion + END IF + PREPARE comando_p FROM selec_pt + DECLARE busca_2 CURSOR FOR comando_p + + LET idx = 1 + FOREACH busca_2 INTO arr_prod[idx].* + LET idx = idx + 1 + END FOREACH + CALL SET_COUNT(idx - 1) + + DISPLAY ARRAY arr_prod TO s_prod.* + AFTER ROW + LET idx = arr_curr() + LET pcodn = arr_prod[idx].cod_n + LET pcodgrupo = arr_prod[idx].cod_grupo + LET pcodtipo = arr_prod[idx].cod_tipo + LET pcodsec = arr_prod[idx].cod_sec + LET pdescripcion = arr_prod[idx].descrip_esp + AFTER DISPLAY + EXIT DISPLAY + END DISPLAY + CLOSE WINDOW busca_2 + RETURN pcodn, pcodgrupo, pcodtipo, pcodsec, pdescripcion + +END FUNCTION diff --git a/PROYECTO/irdir/irfmcs001.per b/PROYECTO/irdir/irfmcs001.per new file mode 100644 index 0000000..d6d2cab --- /dev/null +++ b/PROYECTO/irdir/irfmcs001.per @@ -0,0 +1,73 @@ +{---------------------------------------------------------------------------- + AUTOR: JUAN FCO SOTO + FECHA: + DECRIPCION: FORMATO DE PANTALLA PARA EL REPORTE DE ENTRADA + MODIFICA: ING. JOSE ALFREDO PAULINO + FECHA: 15 DE OCTUBRE DEL 1992 + DESCRIPCION: ADAPTACION PARA SISTEMA DE INVENTARIO DE HERRAMIENTAS +---------------------------------------------------------------------------- +} +database smarmotech + +screen size 24 by 80 +{ +Tipo Movimiento:[t ][t1 ]Doc. No. [f00 ] +\gp-------------------------------------------------------------------------q\g +\g|\gSuplidor:[p1]-[f01 ][a ] Orden de Compra:[f02 ] \g|\g +\gp-------------------------------------------------------------------------q\g +\g|\gConduce:[f03 ] Factura No.[f04 ] Fecha:[f05 ] \g|\g +\gb-------------------------------------------------------------------------d\g + C A N T I D A D Exceso o + Codigo Ordenada Recibida Diferencia Maquina +\gp---------------------------------------------------------------------------q\g +[b ] [f06 ][f07 ][c ] [ma ] +Descripcion: [g ] Unidad: [f08] +[b ] [f06 ][f07 ][c ] [ma ] +Descripcion: [g ] Unidad: [f08] +[b ] [f06 ][f07 ][c ] [ma ] +Descripcion: [g ] Unidad: [f08] +\gb---------------------------------------------------------------------------d\g +} +end +tables + +irtb00006, +cotb00001, +irtb00002, +irtb00005 +attributes +ma = irtb00006.maquina,noentry; +f00 = irtb00006.num_doc, + comments = +"Digite el Numero Documento o Presione Para Buscar Todos Los Documentos"; +p1 = irtb00006.cod_sp,picture = "##",autonext, + comments = "Digite el Codigo del Suplidor"; +f01 = irtb00006.cod_sp_sec,picture = "####", + comments = "Digite el Codigo del Suplidor"; +f02 = irtb00006.orden_compra, + comments = "Digite el Numero de la Orden de Compras"; +f03 = irtb00006.conduce_no, + comments = "Digite el Numero del Conduce Del Suplidor, Si Tiene Conduce"; +f04 = irtb00006.fact_no, + comments = "Digite el Numero de la Factura del Suplidor"; +f05 = formonly.fecha type date,format = "dd/mm/yy", + comments = "Digite la Fecha Correspondiente al Documento"; +f06 = irtb00006.cantidad_1, + comments = "Digite la Cantidad Pedida "; +f07 = irtb00006.cantidad_2, + comments = "Digite la Cantidad Llegada desde el Suplidor"; +f08 = irtb00002.unidad_med,noentry; +a = cotb00001.nom_sp,noentry; +b = formonly.codigo,noentry; +c = formonly.diferencia, noentry; +g = irtb00002.descrip_esp,noentry; +t = irtb00006.cod_mov,autonext, + comments = + "Digite Codigo Movimiento de Entrada (01 - Local 02 - Exterior)", + include = (1 to 2); +t1 = irtb00005.descrip_mov,noentry; + INSTRUCTIONS + screen record s_movi1[3] (codigo,cantidad_1,cantidad_2,diferencia, + descrip_esp,unidad_med,maquina) +delimiters " " +end diff --git a/PROYECTO/irdir/irfmcs006.4fd b/PROYECTO/irdir/irfmcs006.4fd new file mode 100644 index 0000000..a5c00a4 --- /dev/null +++ b/PROYECTO/irdir/irfmcs006.4fd @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + +
+
+
+ + + +
\ No newline at end of file diff --git a/PROYECTO/irdir/irfmcs008.per b/PROYECTO/irdir/irfmcs008.per new file mode 100644 index 0000000..3673ba1 --- /dev/null +++ b/PROYECTO/irdir/irfmcs008.per @@ -0,0 +1,101 @@ +schema smarmotech + +TOPMENU + GROUP g1 (TEXT="CONTEO FISICO") + COMMAND actualizarf (TEXT="Actualizacion Conteo PDA") + COMMAND Eliminarf (TEXT="Eliminar Conteo",IMAGE="cancel") + + END + + GROUP g2 (TEXT="INVENTARIO FISICO") + COMMAND actualizari (TEXT="Actualiza inventario",IMAGE="pda") + COMMAND eliminari (TEXT="Eliminar Inventario Fisico",IMAGE="cancel") + COMMAND imprimir (TEXT="Impresion",IMAGE="printer") + END + + GROUP g3 (TEXT="DOCUMENTO") + COMMAND actualizard (TEXT="Actualziacion Documento") + COMMAND eliminard (TEXT="Eliminar Documento",IMAGE="cancel") + + + END + GROUP g4 (TEXT="Interrumpir") + COMMAND salir (TEXT="Salir Sistema",IMAGE="exit") + END + +END + +LAYOUT (TEXT="Visualizacion Conteo y Ajuste",STYLE="Basic") + GRID + { + + Fecha Conteo : [f1 ] Busca Fecha Conteo[fb ] + Numero Documento Ajuste: [doc ]Fecha Documento:[fd ]No. Registros: [no ] + Codigo Movimiento : [cod ][DESc ] + TIPO INVENTARIO : [tp ] Registros Sumarizados [rs ] + ALMACEN : [al ] Incluye Registros + SECCION : [se ] Que no esten en el conteo[ii ] + TRAMO O FILA : [fila ] Igualo Existencia En + Libro a Fisica? [fs ] + 0 50 100 + [p000 ] + + + + [a ][b ][c ][d ][de ][u ][c1 ][c2 ][d1 ][p1 ][v1 ][v2 ][u1 ][f11 ][z1][z2 ][z3 ][kj ] + [a ][b ][c ][d ][de ][u ][c1 ][c2 ][d1 ][p1 ][v1 ][v2 ][u1 ][f11 ][z1][z2 ][z3 ][kj ] + [a ][b ][c ][d ][de ][u ][c1 ][c2 ][d1 ][p1 ][v1 ][v2 ][u1 ][f11 ][z1][z2 ][z3 ][kj ] + [a ][b ][c ][d ][de ][u ][c1 ][c2 ][d1 ][p1 ][v1 ][v2 ][u1 ][f11 ][z1][z2 ][z3 ][kj ] + [a ][b ][c ][d ][de ][u ][c1 ][c2 ][d1 ][p1 ][v1 ][v2 ][u1 ][f11 ][z1][z2 ][z3 ][kj ] + [a ][b ][c ][d ][de ][u ][c1 ][c2 ][d1 ][p1 ][v1 ][v2 ][u1 ][f11 ][z1][z2 ][z3 ][kj ] + [a ][b ][c ][d ][de ][u ][c1 ][c2 ][d1 ][p1 ][v1 ][v2 ][u1 ][f11 ][z1][z2 ][z3 ][kj ] + [a ][b ][c ][d ][de ][u ][c1 ][c2 ][d1 ][p1 ][v1 ][v2 ][u1 ][f11 ][z1][z2 ][z3 ][kj ] + [a ][b ][c ][d ][de ][u ][c1 ][c2 ][d1 ][p1 ][v1 ][v2 ][u1 ][f11 ][z1][z2 ][z3 ][kj ] + [a ][b ][c ][d ][de ][u ][c1 ][c2 ][d1 ][p1 ][v1 ][v2 ][u1 ][f11 ][z1][z2 ][z3 ][kj ] + TOTAL AJUSTE [t1 ] + TOTAL FISICO[tf ]TOTAL TEORICO[fi ] + } + END + attributes + PROGRESSBAR p000 = formonly.progreso,VALUEMIN=0,VALUEMAX=100,COLOR=GREEN; + doc= formonly.num_doc; + COMBOBOX fb = formonly.busca_fecha; + DATEEDIT fd = formonly.fecha_doc type date,format="dd/mm/yyyy"; + DATEEDIT f1 = formonly.xfecha type date,format="dd/mm/yyyy" ; + COD = formonly.cod_mov; + desc = formonly.descrip_mov; + + CHECKBOX rs = formonly.sumarizo type char,NOT NULL,VALUECHECKED="S",VALUEUNCHECKED="N",default="N"; + CHECKBOX ii = formonly.incluye type char,NOT NULL,VALUECHECKED="S",VALUEUNCHECKED="N",default="N"; + CHECKBOX fs = formonly.igualo type char,NOT NULL,VALUECHECKED="S",VALUEUNCHECKED="N",default="N"; + COMBOBOX tp = formonly.tipo_inventario,include = ("MATERIA PRIMA","PRODUCTOS TERMINADOS","REPUESTOS"); + COMBOBOX al = formonly.almacen; + COMBOBOX se = formonly.seccion; + COMBOBOX fila = formonly.tramo; + + a = formonly.cod_n, UNSORTABLE, TITLE="CLASE"; + b = formonly.cod_grupo,UNSORTABLE, TITLE="GRUPO"; + c = formonly.cod_tipo, UNSORTABLE,TITLE = "TIPO"; + d = formonly.cod_sec, UNSORTABLE,TITLE = "SECUENCIA"; + de = formonly.descripcion, NOENTRY,TITLE="DESCRIPCION"; + u = formonly.unidad_med, NOENTRY,TITLE="UNIDAD MEDIDA"; + c1 = formonly.fisico, TITLE = "FISICO",FORMAT="###,###.#####"; + c2 = formonly.teorico, UNSORTABLE,TITLE ="TEORICO",noentry,FORMAT="---,--#.#####"; + d1 = formonly.diferencia, UNSORTABLE,TITLE="DIFERENCIA",noentry,FORMAT="---,--#.#####"; + p1 = formonly.costo, UNSORTABLE,TITLE ="COSTO",noentry,FORMAT="###,###.####"; + v1 = formonly.valor1, UNSORTABLE,TITLE="VALOR",noentry,FORMAT="---,---,--#.##"; + v2 = formonly.valor2, UNSORTABLE,TITLE="VALOR DIF",noentry,FORMAT="-,---,--#.##"; + t1 = formonly.total2, FORMAT="---,---,--#.##"; + u1 = formonly.usuario,UNSORTABLE,noentry; + f11 = formonly.fechacrea,UNSORTABLE,noentry; + no = formonly.numero_registros,UNSORTABLE,noentry; + z1 = formonly.bodega,UNSORTABLE,noentry,TITLE="bodega"; + z2 = formonly.cod_seccion,UNSORTABLE,noentry,TITLE="SECCION"; + z3 = formonly.cod_tramo,UNSORTABLE,noentry,TITLE="TRAMO O FILA"; + kj = formonly.trxid,UNSORTABLE,noentry; + fi = formonly.total_teorico,FORMAT="--,---,---,--#.##"; + tf = formonly.total_fisico,FORMAT="--,---,---,--#.##"; + INSTRUCTIONS + DELIMITERS " " + SCREEN RECORD sconteo[10](cod_n,cod_grupo,cod_tipo,cod_Sec,descripcion,unidad_med,fisico,teorico,diferencia,costo,valor1,valor2,usuario,fechacrea,bodega,cod_seccion,cod_tramo,trxid) + END \ No newline at end of file diff --git a/PROYECTO/irdir/irfmmt002.4fd b/PROYECTO/irdir/irfmmt002.4fd new file mode 100644 index 0000000..e1e63d5 --- /dev/null +++ b/PROYECTO/irdir/irfmmt002.4fd @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+
+
+
+ + + + + + + + + +
+ + + +
\ No newline at end of file diff --git a/PROYECTO/irdir/irfmmt003.4fd b/PROYECTO/irdir/irfmmt003.4fd new file mode 100644 index 0000000..5d38245 --- /dev/null +++ b/PROYECTO/irdir/irfmmt003.4fd @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + +
\ No newline at end of file diff --git a/PROYECTO/irdir/irfmmt004.per b/PROYECTO/irdir/irfmmt004.per new file mode 100644 index 0000000..a0d5484 --- /dev/null +++ b/PROYECTO/irdir/irfmmt004.per @@ -0,0 +1,40 @@ +database smarmotech +screen size 24 by 80 +{ +Mes Inicial [f1] [g4 ] +Mes Final [f2] [g5 ] +Ano [f002] +Codigo [a ]-[b ]-[c ]-[d ][e ] [g ] + +Costo Estandar [f005 ] +[j] + +Usuario Creador [f006 ] Usuario Modificador [f008 ] +Fecha Creacion [f007 ] Fecha Modificacion [f009 ] +} +end +tables +irtb00013,irtb00002 +attributes +f1 = irtb00013.mes_ini,autonext, + comments = "Digite el mes inicial",default = 01,noentry; +g4 = formonly.descrip1 type char,default = "ENERO"; +f2 = irtb00013.mes_fin,autonext,noentry, + comments = "Digite el mes final",default = 12; +g5 = formonly.descrip2 type char,default = "DICIEMBRE"; +f002 = irtb00013.ano,autonext,comments = "Digite el ano"; +a = irtb00013.cod_n,autonext,comments = "Digite el NIVEL"; +b = irtb00013.cod_grupo,autonext,comments = "Digite el GRUPO"; +c = irtb00013.cod_tipo,autonext,comments = "Digite el TIPO"; +d = irtb00013.cod_sec,autonext,comments = "Digite la SECUENCIA"; +e = irtb00002.descrip_esp,noentry; +g = irtb00002.unidad_med,noentry; +f005 = irtb00013.costo_st,comments = "Digite el costo"; +j = irtb00013.status_t,noentry; +f006 = irtb00013.us_crea,noentry; +f007 = irtb00013.fech_crea,noentry; +f008 = irtb00013.us_mod,noentry; +f009 = irtb00013.fech_mod,noentry; +instructions + delimiters " " +end diff --git a/PROYECTO/irdir/irfmmt006.4fd b/PROYECTO/irdir/irfmmt006.4fd new file mode 100644 index 0000000..2aa3332 --- /dev/null +++ b/PROYECTO/irdir/irfmmt006.4fd @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+
\ No newline at end of file diff --git a/PROYECTO/irdir/irfmmt009.4fd b/PROYECTO/irdir/irfmmt009.4fd new file mode 100644 index 0000000..fb0ceb7 --- /dev/null +++ b/PROYECTO/irdir/irfmmt009.4fd @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + +
+ + + +
\ No newline at end of file diff --git a/PROYECTO/irdir/irfmmt020.4fd b/PROYECTO/irdir/irfmmt020.4fd new file mode 100644 index 0000000..9fc7123 --- /dev/null +++ b/PROYECTO/irdir/irfmmt020.4fd @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+
+
+ + + +