AVInfo Sistemas Posted April 11, 2012 Report Share Posted April 11, 2012 BOA TARDE TENHO CLIENTE QUE FAZEM LICITACOES E PREFEITURA ARREDONDA DIFERENTE DO QUE ESTOU ACOSTUMADO PRODUTO 97,9056 UNITARIO QUANTIDADE 1 TOTAL DEVE SER 97,90 COMO FAÇO PARA CONSIDERAR SÓ 2 CASAS PARA O TOTAL Xharbour 1.2.1 - Fw 10.10 - WS e Pelles tominem@hotmail.com Quote Link to comment Share on other sites More sharing options...
AVInfo Sistemas Posted April 11, 2012 Author Report Share Posted April 11, 2012 BOA TARDE TENHO CLIENTE QUE FAZEM LICITACOES E PREFEITURA ARREDONDA DIFERENTE DO QUE ESTOU ACOSTUMADO PRODUTO 97,9056 UNITARIO QUANTIDADE 1 TOTAL DEVE SER 97,90 COMO FAÇO PARA CONSIDERAR SÓ 2 CASAS PARA O TOTAL Xharbour 1.2.1 - Fw 10.10 - WS e Pelles tominem@hotmail.com Quote Link to comment Share on other sites More sharing options...
Luisão Posted April 11, 2012 Report Share Posted April 11, 2012 Tente assim: Function xRound(nvalor) Return val(left(str(nvalor),at(".",str(nvalor))+2))id=code>id=code>-- Luis Fernando Jr. FWH8.01 + SQLLIB 1.9d + xHB 1.10 + xDev 0.65 + @SAY Quote Link to comment Share on other sites More sharing options...
Luisão Posted April 11, 2012 Report Share Posted April 11, 2012 Melhorando Function xRound(nvalor) Return if(int(nvalor)=nvalor,nvalor,val(left(str(nvalor),at(".",str(nvalor))+2)))id=code>id=code>Aà você pega essa função xRound e estrutura ela melhor, fiz assim pra não perder tempo -- Luis Fernando Jr. FWH8.01 + SQLLIB 1.9d + xHB 1.10 + xDev 0.65 + @SAY Quote Link to comment Share on other sites More sharing options...
vagner Posted April 11, 2012 Report Share Posted April 11, 2012 Olá nVlr := 97.9056 nVlr := (Int(nVlr*100)/100) Vagner Wirts "Ele não sabendo que era impossÃvel, foi lá e fez" Quote Link to comment Share on other sites More sharing options...
sambomb Posted April 11, 2012 Report Share Posted April 11, 2012 Tem certeza que isso é arredondar? Está parecendo truncamento. RCA Sistemas - Itaocara - RJ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.