Diferencia entre revisiones de «Generar Archivo de Liquidación /6 (Becas)»
De Wiki
(→FORMULARIO) |
|||
| (No se muestran 4 ediciones intermedias del mismo usuario) | |||
| Línea 1: | Línea 1: | ||
| − | ==FORMULARIO== | + | ==<div style="text-align:center;color:blue">'''FORMULARIO'''</div>== |
===frm_separo_bec.scx=== | ===frm_separo_bec.scx=== | ||
| Línea 5: | Línea 5: | ||
[[Imagen:Frm_separo_bec.PNG]] | [[Imagen:Frm_separo_bec.PNG]] | ||
| − | ==INFORME== | + | ==<div style="text-align:center;color:blue">'''INFORME'''</div>== |
Esta aplicación no genera '''Reportes'''. | Esta aplicación no genera '''Reportes'''. | ||
| − | ==CÓDIGO== | + | ==<div style="text-align:center;color:blue">'''CÓDIGO'''</div>== |
| − | ===Programa " | + | ===Programa "separo_beca.prg"=== |
*****este programa extrae contratos | *****este programa extrae contratos | ||
| − | + | parameters nro_liq | |
| − | + | close table all | |
set date to french | set date to french | ||
set talk off | set talk off | ||
| Línea 30: | Línea 30: | ||
*------------------------------------------- | *------------------------------------------- | ||
*public v_campo,v_id,legajo,total,vm_importe | *public v_campo,v_id,legajo,total,vm_importe | ||
| − | public vm_periodo | + | public vm_periodo,barra |
*--------------armo fecha del mes | *--------------armo fecha del mes | ||
| + | |||
| + | |||
| + | |||
tabla =vm_bases_informes+"dh22" | tabla =vm_bases_informes+"dh22" | ||
if used ("dh22") | if used ("dh22") | ||
| Línea 41: | Línea 44: | ||
index on nro_liqui tag nro_liqui | 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 per_limes,per_liano,desc_liqui from dh22 where val(nro_liq)=dh22.nro_liqui into cursor "dh22_mes" |
sele dh22_mes | sele dh22_mes | ||
| − | + | vm_periodo=padl(alltrim(str(per_limes)),2,"0")+right(alltrim(str(per_liano)),2) | |
| + | barra= right(alltrim(desc_liqui),1) | ||
*--------------------------------------------------------------------- | *--------------------------------------------------------------------- | ||
| − | |||
************** | ************** | ||
| − | + | ***cambio la vista por el archivo debido al cambio de fuentes | |
*----abro la vista del dh21 con el | *----abro la vista del dh21 con el | ||
cadena1= "select *"; | cadena1= "select *"; | ||
| Línea 59: | Línea 62: | ||
**la paso a una tabla | **la paso a una tabla | ||
sele sele (1) | sele sele (1) | ||
| − | use &nom1 alias | + | use &nom1 alias v_21 |
| − | tabla =vm_bases_informes+" | + | tabla =vm_bases_informes+"dh21" |
| − | sele * from | + | sele * from v_21 into table &tabla |
| − | if used (" | + | if used ("dh21") |
| − | sele | + | sele dh21 |
use | use | ||
endif | endif | ||
| Línea 72: | Línea 75: | ||
use &tabla excl | use &tabla excl | ||
index on nro_legaj tag lega | index on nro_legaj tag lega | ||
| − | sele | + | sele v_21 |
use | use | ||
drop view &nom1 | drop view &nom1 | ||
| + | *!* *------------------------------------------------------------------------------------ | ||
| − | + | *-------------------- | |
| − | * | + | sele distinc nro_legaj,nro_cargo from dh21 into table vm_bases_informes+"cargos_liq" |
| − | sele distinc nro_legaj,nro_cargo from | ||
*------------------------------------------------------------------------------------- | *------------------------------------------------------------------------------------- | ||
| − | |||
cadena2= "select * from dh03" | cadena2= "select * from dh03" | ||
| Línea 91: | Línea 93: | ||
sele sele (1) | sele sele (1) | ||
use &nom2 alias v_dh03 | use &nom2 alias v_dh03 | ||
| − | tabla =vm_bases_informes+" | + | tabla =vm_bases_informes+"dh03_"+barra+vm_periodo |
| − | nom_base=" | + | nom_base="dh03_"+barra+vm_periodo |
| − | sele * from v_dh03 | + | sele * from v_dh03 into table &tabla |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | *!* ****************** | + | *!* ************armo archivo de liq******* |
| − | + | select * from cargos_liq as c,&nom_base as d3 where c.nro_cargo=d3.nro_cargo ; | |
| − | + | into table vm_bases_informes+"dh03_liq"+barra+vm_periodo | |
| − | |||
| + | nom_base_d3d8="dh03_liq"+barra+vm_periodo | ||
| + | select d21.*,codc_categ,codc_carac,fec_alta,fec_baja,hs_dedic," " as barra from &nom_base_d3d8; | ||
| + | as c,dh21 as d21 where c.nro_cargo_=d21.nro_cargo ; | ||
| + | into table vm_bases_informes+"dh21_"+barra+vm_periodo | ||
| + | *!* ******************cruzo con dh03 | ||
*--copio a transacciones el archivo de contratos | *--copio a transacciones el archivo de contratos | ||
| − | nom_base_dh21=" | + | nom_base_dh21="dh21_6"+vm_periodo |
sele &nom_base_dh21 | sele &nom_base_dh21 | ||
| − | repla all barra with " | + | repla all barra with "6" |
copy to "t:\liquidaciones\"+vm_periodo+"\"+nom_base_dh21 | copy to "t:\liquidaciones\"+vm_periodo+"\"+nom_base_dh21 | ||
| − | + | copy to "t:\liquidaciones\"+vm_periodo+"\"+"dh03_liq"+barra+vm_periodo | |
| + | |||
| + | |||
| + | |||
| + | *-- | ||
*---------------------------------- | *---------------------------------- | ||
===Botón "Aceptar" (cmd_aceptar)=== | ===Botón "Aceptar" (cmd_aceptar)=== | ||
| − | + | ||
if thisform.lvwliq.selecteditem.index <> 0 | if thisform.lvwliq.selecteditem.index <> 0 | ||
v_fila= thisform.lvwliq.selecteditem.index | v_fila= thisform.lvwliq.selecteditem.index | ||
| Línea 129: | Línea 130: | ||
messagebox(nro_liq + " " + NOM_LIQ ) | messagebox(nro_liq + " " + NOM_LIQ ) | ||
endif | endif | ||
| − | programa=vm_programas + " | + | programa=vm_programas + "separo_beca.prg" |
do &programa with nro_liq | do &programa with nro_liq | ||
| Línea 135: | Línea 136: | ||
set filter to | set filter to | ||
| − | + | ||
thisform.release | thisform.release | ||
| − | ==MANUAL DEL USUARIO== | + | ==<div style="text-align:center;color:blue">'''MANUAL DEL USUARIO'''</div>== |
'''Procedimiento no disponible''' | '''Procedimiento no disponible''' | ||
Revisión actual del 13:17 14 feb 2012
Contenido
FORMULARIO
frm_separo_bec.scx
INFORME
Esta aplicación no genera Reportes.
CÓDIGO
Programa "separo_beca.prg"
*****este programa extrae contratos
parameters nro_liq
close table 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,barra
*--------------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,desc_liqui 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)
barra= right(alltrim(desc_liqui),1)
*---------------------------------------------------------------------
**************
***cambio la vista por el archivo debido al cambio de fuentes
*----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
tabla =vm_bases_informes+"dh21"
sele * from v_21 into table &tabla
if used ("dh21")
sele dh21
use
endif
sele sele(1)
use &tabla excl
index on nro_legaj tag lega
sele v_21
use
drop view &nom1
*!* *------------------------------------------------------------------------------------
*--------------------
sele distinc nro_legaj,nro_cargo from dh21 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_"+barra+vm_periodo
nom_base="dh03_"+barra+vm_periodo
sele * from v_dh03 into table &tabla
*!* ************armo archivo de liq*******
select * from cargos_liq as c,&nom_base as d3 where c.nro_cargo=d3.nro_cargo ;
into table vm_bases_informes+"dh03_liq"+barra+vm_periodo
nom_base_d3d8="dh03_liq"+barra+vm_periodo
select d21.*,codc_categ,codc_carac,fec_alta,fec_baja,hs_dedic," " as barra from &nom_base_d3d8;
as c,dh21 as d21 where c.nro_cargo_=d21.nro_cargo ;
into table vm_bases_informes+"dh21_"+barra+vm_periodo
*!* ******************cruzo con dh03
*--copio a transacciones el archivo de contratos
nom_base_dh21="dh21_6"+vm_periodo
sele &nom_base_dh21
repla all barra with "6"
copy to "t:\liquidaciones\"+vm_periodo+"\"+nom_base_dh21
copy to "t:\liquidaciones\"+vm_periodo+"\"+"dh03_liq"+barra+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_beca.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