sales tax information

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a product table with productID and UnitCost. I want to calculate sales tax if sales based on instate or state were requires sales tax. In shopping cart I have a Product Quantity and Unitcost per product. I do subtotal on each product and at the end I add up all and do the total.

Should I calculate sales tax per subtotal or should I calculate on total.

Although, I will caluculate tax after I collect Billing and Shipping Info which has state infornation. So When user fills shopping cart I will have just total but on few page later after collecting Billing and Shipping Info I will calculate tax.

Also I like to store total tax or per item base tax in oder table so when User want to see old order I can reassemble again.
 
Unless you have a specific reason to calculate it on a per-item basis (e.g.
different items have different tax rates) You'r want to do it based on the
total. Otherwise you're introducing rounding errors.

If you DO have different items that have different tax rates (this does
happen sometimes) then you'll want to do seperate subtotals for each class
of item and then calculate the taxes.

ppatel said:
I have a product table with productID and UnitCost. I want to calculate
sales tax if sales based on instate or state were requires sales tax. In
shopping cart I have a Product Quantity and Unitcost per product. I do
subtotal on each product and at the end I add up all and do the total.
Should I calculate sales tax per subtotal or should I calculate on total.

Although, I will caluculate tax after I collect Billing and Shipping Info
which has state infornation. So When user fills shopping cart I will have
just total but on few page later after collecting Billing and Shipping Info
I will calculate tax.
Also I like to store total tax or per item base tax in oder table so when
User want to see old order I can reassemble again.
 
Back
Top