View unanswered posts
View active topics
It is currently Tue Oct 23, 2018 6:48 am


Author Message
krmk
Post  Post subject: Sales Tax Problem  |  Posted: Wed Jan 22, 2014 9:05 pm

Joined: Wed Jan 22, 2014 5:14 pm
Posts: 2

Offline
I am a new user. I have been entering orders into the program and I am finding that the sales tax is sometimes off by 1 cent. It seems that it does not round up when the sales tax goes out to three digits. Is there a way to correct this?


Top
AvoAdmin
Post  Post subject: Re: Sales Tax Problem  |  Posted: Wed Jan 22, 2014 10:37 pm
User avatar
Site Admin

Joined: Sun Jan 24, 2010 1:55 pm
Posts: 107

Offline
krmk wrote:
I am a new user. I have been entering orders into the program and I am finding that the sales tax is sometimes off by 1 cent. It seems that it does not round up when the sales tax goes out to three digits. Is there a way to correct this?


Yes, that's difficult. It's called banker's rounding. It occurs when the amount is in half pennies, if it's under .50 it rounds down, if it's above it rounds up to the nearest penny. You can't charge $1.08562621662, so you charge $1.09. It's an unfortunate side effect of how computers (in this case Delphi) handle currency.

I'll look through the routines again tomorrow but I'm sure I'm using Round with .2 decimal.


Top
AvoAdmin
Post  Post subject: Re: Sales Tax Problem  |  Posted: Thu Jan 23, 2014 8:18 am
User avatar
Site Admin

Joined: Sun Jan 24, 2010 1:55 pm
Posts: 107

Offline
Can you give me your tax rate or rates? Are you using multiple tax rates based on amounts - or just a single tax rate? Are you using a compound tax rate?

In Utah my wife using AvoBase (with Avon) uses 6.825%.

I'm looking at the code now and the rounding mode is SetRoundMode(rmNearest) which is exactly bankers rounding.


Top
AvoAdmin
Post  Post subject: Re: Sales Tax Problem  |  Posted: Thu Jan 23, 2014 9:00 am
User avatar
Site Admin

Joined: Sun Jan 24, 2010 1:55 pm
Posts: 107

Offline
Ok for AvoBase 2.117 I am adding the ability to select your own tax preference for rounding.

You will have four choices:

1. Round Up - the nearest whole number that is greater than equal to the parameter is returned, namely 6.00 and -1.00 respectively.

2. Round Down - produces the nearest whole number that is less than or equal to value passed as parameter, for 5.7, the return value is 5.00 and for -1.3, this value is -2.00.

3. Round Nearest - the closest whole number is returned without regard it for being less than or greater than the value passed to Round().

4. Round Truncate - simply return the value of the parameter passed with the fractional portion removed.


Top
AvoAdmin
Post  Post subject: Re: Sales Tax Problem  |  Posted: Wed Apr 09, 2014 7:26 am
User avatar
Site Admin

Joined: Sun Jan 24, 2010 1:55 pm
Posts: 107

Offline
This has been fixed in AvoBase 2.117. Four types of rounding have been added.


Top
Display posts from previous:  Sort by  
Print view

Who is online
Users browsing this forum: No registered users and 1 guest
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
Jump to:   
cron

Delete all board cookies | The team | All times are UTC - 7 hours [ DST ]

Powered by phpBB © phpBB Group.