*croll() ;*SetPos(0,0) ;*ReadKill(.T.) ;*GetList := {}
Set( 4, if(__SetCentury(), "dd/mm/yyyy", "dd/mm/yy") )
__SetCentury( "on" )
Set( 5, 1990 )
Set( 3, 8 )
xdata := ctod("10.02.2002")
valor := 0
taxa  := 2.5
meses := 10
DevPos( 10, 32 ) ; DevOut( "Valor a Financiar: " ) ; SetPos( Row(), Col()+1 ) ; AAdd( GetList, _GET_( valor, "valor", "@E 999999.99",, ):display() )
DevPos( 11, 32 ) ; DevOut( "taxa mensal .....: " ) ; SetPos( Row(), Col()+1 ) ; AAdd( GetList, _GET_( taxa, "taxa", "@E 999.99",, ):display() )
DevPos( 12, 32 ) ; DevOut( "Numero de Meses..: " ) ; SetPos( Row(), Col()+1 ) ; AAdd( GetList, _GET_( meses, "meses", "@e 999",, ):display() )
DevPos( 13, 32 ) ; DevOut( "Data Inicial.....: " ) ; SetPos( Row(), Col()+1 ) ; AAdd( GetList, _GET_( xdata, "xdata",,, ):display() )
ReadModal(GetList) ; GetList := {}
if ! abre_prt('12',.t.)
   *- fechajan(@x_Tela)
   return
endif
*Set( 20, "PRINTER" )
*Set( 24, "carro.rel", .F. )
xtotal := 0
xmes := xdata
i:=0

DevPos( 00, 00 ) 
DevOut( "Data           Parcela  Tx dia   999            Correcao   Vl Corrigido   Saldo" )

for i:=1 to meses
   xmes    += 30
   xtxdia  := (taxa/30)/100
   xdias   := xmes - xdata
   xparc   := ( valor / meses )
   xvalmes := xparc * ( xdias * xtxdia )
   xtotal  += xvalmes
   DevPos( prow()+1, 00 ) ; DevOut( xmes )
   DevPos( prow(), 12 ) ; DevOutPict( xvalmes, "@e 999,999.99" )
   DevPos( prow(), 25 ) ; DevOutPict( xparc, "@e 999,999.99" )
   DevPos( prow(), 37 ) ; DevOutPict( xtotal, "@e 999,999.99" )
next
