in reply to Re^2: Decimal Arithmetic
in thread Decimal Arithmetic

This is purely a design problem. Why do you have a price for each item, but only a total tax for the invoice? Why not have a price for each item, a tax for each item, and a S&H for each item? Then, you aggregate those as the total tax and total S&H for the invoice.

If, as I suspect, the S&H won't be amenable to that kind of breakout, then that's where your business problem arises.


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?