Re: Change all products to taxable goods
Thanks for this SQL patch; UPDATE products SET products_tax_class_id=1;
Works great but ...
I currently have my prices set as "tax included" and tax class "none" so today on the product set up page each of my "net price" is the same as my "gross price"
When I run this patch it, of course, causes the tax to be added to my net price to create a new gross price which is too high.
This seems like an issue other people will have run into but I did not find a solution anywhere?
I suppose I could write an SQL patch to copy each of the net prices to the gross price box and then recalculate the net prices, does not seem too elegant a solution?
Re: Change all products to taxable goods
Quote:
Originally Posted by
marton_1
Thanks for this SQL patch; UPDATE products SET products_tax_class_id=1;
Works great but ...
I currently have my prices set as "tax included" and tax class "none" so today on the product set up page each of my "net price" is the same as my "gross price"
When I run this patch it, of course, causes the tax to be added to my net price to create a new gross price which is too high.
This seems like an issue other people will have run into but I did not find a solution anywhere?
I suppose I could write an SQL patch to copy each of the net prices to the gross price box and then recalculate the net prices, does not seem too elegant a solution?
The patch provided doesn't take into account the very unusual action of changing the entire store from tax-added to tax-included. That requires manual editing of each price to remove the tax component, because it still adds the tax at checkout (just displays it differently).
Re: Change all products to taxable goods
Re: Change all products to taxable goods
I recall seeing something similar years ago. You may want to look at a couple of older threads on increasing and decreasing prices.
https://www.zen-cart.com/showthread....ecrease+prices
https://www.zen-cart.com/showthread....versally/page3
Re: Change all products to taxable goods
Great thanks
I experimented with - UPDATE products SET products_price = products_price / (1 + tax rate)
Then ran the - UPDATE products SET products_tax_class_id=1;
Worked fine on my test site.
Now I just have to do the same with my attribute prices :shocking:
Re: Change all products to taxable goods
Quote:
Originally Posted by
DrByte
The patch provided doesn't take into account the very unusual action of changing the entire store from tax-added to tax-included. That requires manual editing of each price to remove the tax component, because it still adds the tax at checkout (just displays it differently).
Was not really my idea, the tax authorities were pushing me to show the tax value on the invoice :(
Anyway turned out OK.
I ran Change tax category "UPDATE products SET products_tax_class_id=1;"
The few products in a different tax class I changed manually to tax_class_id=2
Then I ran "UPDATE products SET products_price = products_price /(1 plus tax rate) WHERE products_tax_class_id=1;"
Did the same for tax_class_id=2
Then I ran Fix tax in attribute prices; "UPDATE products_attributes SET options_values_price = options_values_price/(1 plus tax rate) WHERE options_values_price <> '0';"
Then I ran Fix tax in specials prices; "UPDATE specials SET specials_new_products_price = specials_new_products_price/(1 plus tax rate) WHERE specials_new_products_price <> '0';"
The few attributes and specials for tax rate 2 I changed manually, I could also have tried multiple WHERE statements.