Re: [Emerald] calculating termed-discount values

Dale E. Reed Jr. ( (no email) )
Fri, 21 May 1999 10:36:28 -0700

Josh Hillman wrote:
>
> This may sound like a stupid question, but is there a real reason to make
> the monthly amount (in the case above, 16.66 or 16.67) be restricted to 2
> decimal places (obviously corresponding with pennies)? If there's a termed
> discount involved with an account, then the customer isn't going to be
> paying $16.67 (or 16.6666667)--they're going to be paying the full term
> amount of 200.0x.

Yes, I sorta covered this earlier, but I'll show detail. On the invoice
you have something like this:

Login Description Cost Quantity Item Total
------ ----------- ----- -------- ----------
daler PPP Dialup 16.67 12 200.04

Now, if we careied out the decimals in the background (like 278 did) and
then calc the total, you would get something like:

Login Description Cost Quantity Item Total
------ ----------- ----- -------- ----------
daler PPP Dialup 16.66 12 200.00

Which, while the item total is more appealing, is NOT correct.

> So in the case above, the normal monthly rate could really be $20.000000 and
> the annual discounted rate could be $16.666667 (which is quite a bit
> different from 16.67 when calculating an annual total). Nothing at all
> would ever come out different with non-termed-discounts, but those that are
> affected by termed discounts have a lot more room to allow the admin to
> tweak the totals, so the customer woulnd't see "Amount Due: $200.04" (or
> $199.92) -- it'd be $200.00 (currently not possible because of the monthly
> rate rounding).
>
> I'm just bouncing ideas around. Maybe I've been in the realm of
> science/engineering too long and am used to deeper precission...

I suppose an alternate display it this way:

Login Description Cost Quantity Discount Item Total
------ ----------- ----- -------- -------- ----------
daler PPP Dialup 25.00 12 33.3333 200.00

Although the discount isn't appealing in that format. :( I
just have to make sure that the numbers on the invoice actual
come out when your customer is doing the math.

-- 

Dale E. Reed Jr. Emerald and RadiusNT__________________________________________IEA Software, Inc. www.iea-software.com