Best way to store sales tax information

Posted by Seph on Stack Overflow See other posts from Stack Overflow or by Seph
Published on 2010-03-08T12:34:33Z Indexed on 2010/03/08 12:36 UTC
Read the original article Hit count: 351

When designing a stock management database system (sales / purchases) what would be the best way to store the various taxes and other such amounts?

A few of the fields that could be saved are:

  • Unit price excluding tax
  • Unit price including tax
  • Tax per item
  • Total excluding tax (rounded to 2 decimals)
  • Total including tax (rounded to 2 decimals)
  • Total tax (rounded to 2 decimals)

Currently the most reasonable solution so far is storing down (roughly) item, quantity, total excluding tax (rounded) and the total tax (rounded).

Can anyone suggest some better way of storing this details for a generic system?

Also, given the system needs to be robust, what should be done if there were multiple tax values (eg: state and city) which might need to be separated, in this case a separate table would be in order, but would it be considered excessive to just have a rowID and some taxID mapping to a totalTax column?

© Stack Overflow or respective owner

Related posts about sql

Related posts about database-design