Generar Archivo de Liquidación /F (Fonid)
De Wiki
Revisión del 13:22 14 feb 2012 de Mwilson (Discusión | contribuciones)
Contenido
FORMULARIO
frm_separo_fonid.scx
INFORME
Esta aplicación no genera Reportes.
CÓDIGO
Programa "separo_fonid.prg"
*****este programa extrae fonid parameters nro_liq close tables all 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) *--------------------------------------------------------------------- wait windows+"dh21" ************** *----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" *------------------------------------------------------------------------------------- wait windows+"dh03" 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_f"+vm_periodo nom_base="dh03_f"+vm_periodo sele * from v_dh03 into table &tabla *!* ************armo archivo de general******* select * from cargos_liq as c,&nom_base as d3 where c.nro_cargo=d3.nro_cargo ; into table vm_bases_informes+"dh03_liq_f"+vm_periodo nom_base_d3d0="dh03_liq_f"+vm_periodo select d21.*,codc_categ,codc_carac,fec_alta,fec_baja,hs_dedic," " as barra from &nom_base_d3d0 as c,dh21_0; as d21 where c.nro_cargo_=d21.nro_cargo ; into table vm_bases_informes+"dh21_f"+vm_periodo *--copio a transacciones el archivo de contratos nom_base_dh21="dh21_f"+vm_periodo sele &nom_base_dh21 repla all barra with "F" repla all codn_conce with 122 for codn_conce=917 repla all codn_conce with 130 for codn_conce=918 copy to "T:\liquidaciones\"+vm_periodo+"\"+nom_base_dh21 copy to "T:\liquidaciones\"+vm_periodo+"\"+"dh03_liq_f"+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_fonid.prg" do &programa with nro_liq
Botón "Salir" (Salir)
set filter to close tables all thisform.release
MANUAL DEL USUARIO
Procedimiento no disponible
Procedimiento de Uso
Procedimiento no disponible