[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: percentage discount not calculating properly

Hi Bob,

Chris can confirm more detail, or correct me if needed, but....

As I understand it the problem is how discounts are calculated and when the rounding is done.

I believe that 1.2.20 fixes the problems.
In fact I think the fix was in 1.2.19 or earlier, but there was a glitch with 1.2.19 so jump straight to 1.2.20 please.

1.2.20 is currently at rc2 (release candidate 2) status and should be fully released any day.

As far as I can tell it should be safe to upgrade any 1.2.x system to 1.2.20.rc2 by simply downloading the latest or using svn, then replacing the existing installation.

As always please backup your existing installation before you start :)

Out of interest which version of 1.2 is the client running.

David Godfrey

Bob Miller wrote:
Greetings gurus and list members...
One of my clients has recently noticed a slight peculiarity in the
percentage discount, and I have been able to verify it.
For example, sell 252 items at $1.05 with a 15% discount.  By my handy
dandy calculator application, 252*1.05*.85=224.91.  However, on the
invoice, the total calculated is $224.28.  It is a small difference,
however, it grows when more items are sold.  When we put on another
invoice 784 of the same item being sold at $1.05 with the same 15%
discount, 784*1.05*.85=699.72, however the invoice states under the
extended column that the value should be $697.76, which is a discrepancy
now measuring in full dollars. Conversely, selling 7 items at $100 with the same 15% discount, 7*
$100*.85=$595, and it calculates this properly.  But, if I sell those
items at $100.05, it takes things out of whack again:  7*$100.05*.85=
$595.2975($595.30), however the invoice calculates $595.28.  Again, this
is only 2 cents, but that is obviously going to be a problem over a
period of time.
My first suspicion is that this is a rounding issue, but the difference
doesn't work out to be a single penny per item sold.  It also occurred
to me that it may be applying the discount before or after something
else is being calculated on that number, such as tax or another
discount, but again I don't make the numbers add up to anything that
supports that theory. Anybody have any theories on what might be causing this? Or one better,
how to fix it?  Any comments are much appreciated...

Bob Miller
Network, Internet, Server,
and Open Source Solutions

Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
Ledger-smb-users mailing list