Best way to store sales tax information
- by Seph
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?