Last post Jan 28, 2013 05:41 AM by Tuppers
Jan 27, 2013 06:58 AM|Tuppers|LINK
Hey peeps just wanted to check with you all but how do you guys or how would you store your product price info?
Not sure if I should store it before or after adding tax?
Thanks for looking
Jan 27, 2013 07:27 AM|Afzaal.Ahmad.Zeeshan|LINK
If it was upto me. I would have saved prices just like ints "10"
For example in database creating a table which can save prices too.
If you want to truely add tax. Than store it with adding tax. Or else tell the uploader that your site will automaticall add tax! Like
Hi user, your items price was 10 dollars our site need 10% of tax on it so your item will be sold for 11 dollars.
Is it ok?
And after he accepts it. Save the price as 11$
Jan 27, 2013 08:39 AM|mhcodner|LINK
If your tax may vary from time to time then it is best to store the price in the database then on your page add the tax because then you only need to change the tax amount instead of changing all of the values in the database
Jan 27, 2013 12:27 PM|Mikesdotnetting|LINK
Store tax in your database separately., Don't store it as an application constant. Tax rates change, and so can who and what it applies to. Also, store the tax rate that was applied to an individual order as part of the order. If you need to regenerate the
order or its associated invoice at some point in the future, you will need to know what tax rate was applied to it at the time.
Jan 28, 2013 05:41 AM|Tuppers|LINK
Cheers thanks for looking much appreciated and food for thought