Generar Archivo de Liquidación /8 (Contratos)
De Wiki
Revisión del 13:19 14 feb 2012 de Mwilson (Discusión | contribuciones)
Contenido
FORMULARIO
frm_separo_cont.scx
INFORME
Esta aplicación no genera Reportes.
CÓDIGO
Programa "separo_cont.prg"
*****este programa extrae contratos parameters nro_liq set date to french set talk off set safe off set delete on SET TALK OFF SET SAFETY OFF SET EXCLU ON SET DATE TO DMY SET CENT ON SET DELETED ON *------------------------------------------- *public v_campo,v_id,legajo,total,vm_importe public vm_periodo *--------------armo fecha del mes tabla =vm_bases_informes+"dh22" if used ("dh22") sele dh22 use endif sele sele(1) use &tabla excl index on nro_liqui tag nro_liqui sele per_limes,per_liano from dh22 where val(nro_liq)=dh22.nro_liqui into cursor "dh22_mes" sele dh22_mes vm_periodo=padl(alltrim(str(per_limes)),2,"0")+right(alltrim(str(per_liano)),2) *--------------------------------------------------------------------- ************** *----abro la vista del dh21 con el cadena1= "select *"; + " from dh21 where nro_liqui = "+nro_liq nom1=sys(3) create sql view &nom1; connection ""; as &cadena1 **la paso a una tabla sele sele (1) use &nom1 alias v_21_0 tabla =vm_bases_informes+"dh21_0" sele * from v_21_0 into table &tabla if used ("dh21_0") sele dh21_0 use endif sele sele(1) use &tabla excl index on nro_legaj tag lega sele v_21_0 use drop view &nom1 *!* *------------------------------------------------------------------------------------ sele distinc nro_legaj,nro_cargo from dh21_0 into table vm_bases_informes+"cargos_liq" *------------------------------------------------------------------------------------- cadena2= "select * from dh03" nom2=sys(3) create sql view &nom2; connection ""; as &cadena2 **la paso a una tabla sele sele (1) use &nom2 alias v_dh03 tabla =vm_bases_informes+"dh03_8"+vm_periodo nom_base="dh03_8"+vm_periodo sele * from v_dh03 where inlist(codc_carac,'CONT','JUNC','JUSC',; 'JUDC') into table &tabla *!* ************armo archivo de contratos******* select * from cargos_liq as c,&nom_base as d3 where c.nro_cargo=d3.nro_cargo ; into table vm_bases_informes+"dh03_liq_8"+vm_periodo nom_base_d3d8="dh03_liq_8"+vm_periodo select d21.*,codc_categ,codc_carac,fec_alta,fec_baja,hs_dedic," " as barra from &nom_base_d3d8 as c,dh21_0; as d21 where c.nro_cargo_=d21.nro_cargo ; into table vm_bases_informes+"dh21_8"+vm_periodo *--copio a transacciones el archivo de contratos nom_base_dh21="dh21_8"+vm_periodo sele &nom_base_dh21 repla all barra with "8" copy to "T:\liquidaciones\"+vm_periodo+"\"+nom_base_dh21 copy to "T:\liquidaciones\"+vm_periodo+"\dh03_liq_8"+vm_periodo *----------------------------------
Botón "Aceptar" (cmd_aceptar)
if thisform.lvwliq.selecteditem.index <> 0 v_fila= thisform.lvwliq.selecteditem.index messagebox(str(v_fila)) nro_liq=thisform.lvwliq.listitems(v_fila).text nom_liq=thisform.lvwliq.listitems(v_fila).SUBITEMS(1) messagebox(nro_liq + " " + NOM_LIQ ) endif programa=vm_programas + "separo_cont.prg" do &programa with nro_liq
Botón "Salir" (Salir)
set filter to thisform.release
MANUAL DEL USUARIO
Procedimiento no disponible
Procedimiento de Uso
Procedimiento no disponible