{ --------------------------------------------------------------------------- PROGRAMA : COPRMT015 OBJETIVO : Actualiza Las Ordenes Para Cerrarlas O Abrilas PROGRAMADOR : Juan F. Soto FECHA : AGOSTO 1997 DIRECTOR PROYECTO : JOSE ALFREDO PAULINO ALEJO ---------------------------------------------------------------------------- } GLOBALS "coprgb000.4gl" DEFINE us_crea,us_mod CHAR(9) DEFINE fech_crea LIKE cotb00014.fech_mod, fech_mod like cotb00014.fech_mod MAIN DEFER INTERRUPT CALL ARG_VAL(1) RETURNING usuarios CALL ARG_VAL(2) RETURNING clave CALL ARG_VAL(3) RETURNING impresor CONNECT to "smarmotech" USER usuarios USING clave SELECT a.* INTO p_companias.* FROM companias a CALL coprmt015() END MAIN FUNCTION coprmt015() OPEN WINDOW act_oc AT 10,3 WITH FORM "cofmwd015" ATTRIBUTE (BORDER, FORM LINE FIRST +1) LABEL volver: INPUT BY NAME ordenes.num_oc,ordenes.tipo,ordenes.cierre AFTER FIELD tipo SELECT a.cierre,a.us_crea,a.fech_crea,a.us_mod,a.fech_mod INTO ordenes.cierre,us_crea,fech_crea,us_mod,fech_mod FROM cotb00014 a WHERE a.num_oc = ordenes.num_oc and a.tipo = ordenes.tipo and a.status_t is null IF status = notfound THEN LET numero_msg = 3 CALL msg(numero_msg) NEXT FIELD num_oc END IF DISPLAY BY NAME us_crea,fech_crea,us_mod,fech_mod,ordenes.cierre AFTER INPUT IF int_flag THEN LET numero_msg = 2 CALL msg(numero_msg) EXIT INPUT END IF EXIT INPUT END INPUT IF int_flag THEN LET int_flag = false GOTO salir END IF UPDATE cotb00014 set cierre = ordenes.cierre, us_mod = suser_sname(), fech_mod = getdate() WHERE num_oc = ordenes.num_oc and tipo = ordenes.tipo LET numero_msg = 13 CALL msg(numero_msg) GOTO volver LABEL salir: CLOSE WINDOW act_oc END FUNCTION