|
|
Línea 1: |
Línea 1: |
| ==FORMULARIO== | | ==FORMULARIO== |
| | | |
− | ===frm_separo_gen.scx=== | + | ===frm_separo_cont.scx=== |
| | | |
− | [[Imagen:Frm_separo_gen.PNG]] | + | [[Imagen:Frm_separo_cont.PNG]] |
| | | |
| ==INFORME== | | ==INFORME== |
Línea 12: |
Línea 12: |
| | | |
| | | |
− | ===Programa "separo_general.prg"=== | + | ===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)
| |
− | *---------------------------------------------------------------------
| |
− |
| |
− |
| |
− | **************
| |
− | wait windows "pide 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"
| |
− | *-------------------------------------------------------------------------------------
| |
− |
| |
− | 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_0"+vm_periodo
| |
− | nom_base="dh03_0"+vm_periodo
| |
− | sele * from v_dh03 where not inlist(codc_carac,'CONT','JUNC','JUSC',;
| |
− | 'JUDC') into table &tabla
| |
− | ***jdcc 'JUDCI',,'JCON',LO SAQUE
| |
− |
| |
− | *!* ************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_0"+vm_periodo
| |
− |
| |
− | nom_base_d3d0="dh03_liq_0"+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_0"+vm_periodo
| |
− |
| |
− | *!* ******************cruzo contratos con dh03 de contratos
| |
− | *!* sele * from dh01 as d1,&nom_base_d3d0 as dliq;
| |
− | *!* where d1.nro_legaj=dliq.nro_legaj;
| |
− | *!* into table vm_bases_informes+"dh01_0"+vm_periodo
| |
− |
| |
− | *--copio a transacciones el archivo de contratos
| |
− | nom_base_dh21="dh21_0"+vm_periodo
| |
− | sele &nom_base_dh21
| |
− | repla all barra with "0"
| |
− | copy to "t:\liquidaciones\"+vm_periodo+"\"+nom_base_dh21
| |
− |
| |
− |
| |
− | *----------------------------------
| |
| | | |
| ===Botón "Aceptar" (cmd_aceptar)=== | | ===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_general.prg"
| |
− | do &programa with nro_liq
| |
| | | |
| ===Botón "Salir" (Salir)=== | | ===Botón "Salir" (Salir)=== |
| | | |
− | set filter to
| |
− | close tables all
| |
− | thisform.release
| |
| | | |
| ==MANUAL DEL USUARIO== | | ==MANUAL DEL USUARIO== |