Gary thanks for the response.
Yeah, I rather suspected that I would have to handle it specifically.
Regarding yur comment re GST - it actually get far worse! I'm writing out
an EDI file during an Invoice run from my package, to be read by an
accounting package. Because the accounting package wants to group the data
a different way to how it is presented in the invoice, we are having to send
an "item line" with extention, for *each log docket*. (rather than a for a
group of similar products) So each docket (there could be several hundred
on each invoice) has its extention rounded to currency. When you total all
these in the accounting package, you get a different answer than is produced
from my invoice which just multiplies the the total volume, for a product
group), by the rate (and rounds once).
So we have an invoice for $1.1M which is 49c out when compared with the
accounting package data
It really would be easier if these bean counters realised that the real
(intermadiate) answer sometimes requires more than just whole cents!
>8-(
Maybe a different career would be worth investigating! Forestry perhaps?!
Mark
----- Original Message -----
From: "Gary T. Benner" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Thursday, April 05, 2001 9:32 PM
Subject: RE: [DUG]: Totalling currency extentions in QR
[Reply]
At 14:36 on 6/04/2001 you wrote
>To :
>CC :
>From: Mark Howard, [EMAIL PROTECTED]
>Hi all
>
>I'm sure this must ba a basic question
>
>In a Quick Report I have line items in an invoice that go
> quantity price Amount (quantity*price)
>
>The total amount at the end of the line items however does not always equal
the sum of the line item amounts. This is because
the Amounts being totalled will have more decimal places than are being
displayed.
>
>What is the simplest way around this problem please?
Pursue a career elsewhere!!! <g>
Seriously though, you need to look at rounding the figures at some point and
storing what is displayed. So if you are totalling line
item amounts, then what is displayed for each line item must be that. ie
your code for extending (amount * quantity) should do
the rounding (to 2 decimal places), and the document total should be the sum
of these rounded line item amounts.
Kind Regards
Gary
PS: It gets worse when you have GST in there as well......
========================================================
Gary Benner - Software Developer [EMAIL PROTECTED]
Corporate Software New Zealand Limited Auckland - New Zealand
tel: +64-9 846-6067 (24hr) fax: +64-9 846-6152 mob: (021)-966-992
Software System Design - Consulting - Mentoring - Data Modelling
Client Server - Delphi - Interbase - Oracle - Web-based Technologies
Electronic Automation and Systems - Microcontroller Design & Software
http://www.corporate.co.nz
Ref#: 41006
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"