Normal Topic Money rounding (Read 1093 times)
FlipGilbert
Full Member
***
Offline


Running Ver 2.6.4

Posts: 236
Location: Sandy Eggo
Joined: Mar 8th, 2005
Money rounding
Aug 2nd, 2005 at 6:49pm
Print Post Print Post  
Hello all
I know this question has been asked at least a dozen times, but I have been unable to find it.
My problem is giving Caesar his due, when calculating sales tax ..best example is $90.00 X .0775 it comes up as $6.97 instead of $6.98
I understand it is actually $6.975 but it not round up or down. All my proper fields are money fields, anyone have a solution?

I remember programmers talking about having a way to round up or down to always be in my favor, hows that coming along?
Wink
thanks again for any help
  

It's not what a man says that matters or how he says it, but what he does and how he does it.
Back to top
 
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Money rounding
Reply #1 - Aug 3rd, 2005 at 9:01pm
Print Post Print Post  
FlipGilbert,

If you check out the June 2005 issue of Inside Sesame Carl Underwood wrote a really helpful article called Round Money & Numbers Predictably with a Custom Function.

This article should give you exactly what you need. Smiley

  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
FlipGilbert
Full Member
***
Offline


Running Ver 2.6.4

Posts: 236
Location: Sandy Eggo
Joined: Mar 8th, 2005
Re: Money rounding
Reply #2 - Aug 5th, 2005 at 7:49pm
Print Post Print Post  
I do, I do, I do read Inside Sesame! Doesnt everyone?
I knew I seen it somewhere just couldnt figure out where.
Thank you Bob and thank you Carl for a very helpful article
  

It's not what a man says that matters or how he says it, but what he does and how he does it.
Back to top
 
IP Logged
 
Foster
Ex Member


Re: Money rounding
Reply #3 - Aug 5th, 2005 at 9:29pm
Print Post Print Post  
No, not everyone!  Cry   The employer does not see the need. Cry
  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1350
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Money rounding
Reply #4 - Aug 8th, 2005 at 2:37am
Print Post Print Post  
BOBSCOTT & FlipGilbert,

Thanks for the feedback, guys. I'm glad to hear you found it useful.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Money rounding
Reply #5 - Aug 8th, 2005 at 4:52am
Print Post Print Post  
Quote:
I'm glad to hear you found it useful.


Carl Underwood,

I found it useful and very helpful! Thank you.

To help other forum users in the future (If there is no conflict with Inside Sesame) Maybe you can ask the Forum Administrator to post the code to the Programming Examples section of the forum. I am sure many will benefit from using your function.

  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Money rounding
Reply #6 - Aug 8th, 2005 at 12:02pm
Print Post Print Post  
Admin isn't needed here. Carl can post the code.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1350
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Money rounding
Reply #7 - Aug 8th, 2005 at 1:47pm
Print Post Print Post  
Normally, I think the publisher of Inside Sesame would prefer that I don't give away code on a public forum that he paid for and published; but in this case, I had already posted it here before sending it to Inside Sesame.
http://www.lantica.com/Forum2/cgi-bin/yabb/YaBB.pl?board=gen_disc;action=display...
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged