GetList := {}
Set( 4, if(__SetCentury(), "dd/mm/yyyy", "dd/mm/yy") )
__SetCentury( "on" )
Set( 5, 1990 )

xtaxa  := 2.5
xvalor := 0
xparc  := 7
xinicio := date()
arquivo := space(50)
DevPos( 10, 32 ) ; DevOut( "Valor..: " ) ; SetPos( Row(), Col()+1 ) ; AAdd( GetList, _GET_( xvalor, "xvalor", "@E 999999.99",, ):display() )
DevPos( 11, 32 ) ; DevOut( "Taxa...: " ) ; SetPos( Row(), Col()+1 ) ; AAdd( GetList, _GET_( xtaxa, "xtaxa", "@E 999.99",, ):display() )
DevPos( 12, 32 ) ; DevOut( "Nr Prc.: " ) ; SetPos( Row(), Col()+1 ) ; AAdd( GetList, _GET_( xparc, "xparc", "@E 999",, ):display() )
* DevPos( 15, 32 ) 
* DevOut( "Arquivo: " ) 
* SetPos( Row(), Col()+1 ) 
* AAdd( GetList, _GET_( arquivo, "arquivo",,, ):display() )
ReadModal(GetList) ; GetList := {}
if ! abre_prt("12",.T.)
   return
endif


DevPos( prow()+1, 00 ) ; DevOut( "Valor a parcelar: " + transform(xvalor,"@E 999,999.99" ) )
DevPos( prow()+1, 00 ) ; DevOut( "Taxa Mensal.....: " + transform(xtaxa,"@E 999,999.99" ) )
DevPos( prow()+1, 00 ) ; DevOut( "Nr. Parcelas....: " + transform(xparc,"@E 999,999" ) )
DevPos( prow()+2, 00 ) ; DevOut( "PARCELAMENTO" )
DevPos( PROW()+1, 00 ) ; DevOut( REPL("-",60) )
xtotal := 0
i := 0
for i := 1 to xparc
    xdata  := xinicio+(30*i)
    xdias  := xdata - xinicio
    xtxdia := (xtaxa/30)*xdias
    xtxcor := ( xtxdia / ( 100 - xtxdia ) ) * 100
    xvalpr := (xvalor/xparc)*(1+(xtxcor/100))
    DevPos( prow()+1, 00 ) ; DevOut( xdata )
    DevPos( prow(), 12 ) ; DevOutPict( xvalor/xparc, "@E 999,999.99" )
    DevPos( prow(), 24 ) ; DevOutPict( xdias, "@E 999" )
    DevPos( prow(), 30 ) ; DevOutPict( xtxdia, "@E 999.99" )
    DevPos( prow(), 37 ) ; DevOutPict( xtxcor, "@E 999.99" )
    DevPos( prow(), 45 ) ; DevOutPict( xvalpr, "@E 999,999.99" )
    xtotal += xvalpr
next
DevPos( prow()+1, 00 ) ; DevOut( repl("-",60) )
DevPos( PROW()+1, 00 ) ; DevOut( "Valor Corrigido" ) 
DevPos( prow(), 45 ) ; DevOutPict( xtotal, "@E 999,999.99" )
DevPos( PROW()+1, 00 ) ; DevOut( "Juros" ) 
DevPos( prow(), 45 ) ; DevOutPict( xtotal-xvalor, "@E 999,999.99" )
DevPos( PROW()+1, 00 ) ; DevOut( "Taxa total de juros" ) 
DevPos( prow(), 45 ) ; DevOutPict( (xtotal-xvalor) / xtotal *100, "@E 999,999.99" )
