Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rounding Issues Due to Discounted Pricing

Status
Not open for further replies.

klmnop

MIS
May 4, 2006
167
US
We have SAP as our back end and use EDI HQ on our front end. For customers who only allow us to pass 2 digits, periodically, the EDI invoice we create will be incorrect, due to rounding issues, when the calculated 'Each price' does not adding up to the expected total.

Ex:
Order Detail:
Item: A
Quantity: 12
Price: 3.49
Qty x Price= 41.88
All straightforward so far. However, customer gets 5% discount:

Discounted price for 1 unit:

3.49
- .1745
---------
3.3155

For all 12:

41.88
- 2.094
--------
39.786

Extended total is 39.786, but displays as 39.79 in my ERP system.


I need to list a 2 decimal each price in the EDI invoice, and have it add up to the total in the EDI invoice.

If I use 3.32:

3.32
x 12
---------
39.84

There's a 5 cent difference in this case.

Are there any best practices to follow for this issue? Any advice would be greatly appreciated. Is there a name for this situation? I figured it had to be fairly common but haven't been able to find any similar issues from a search.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top