Hi.
I have eshop. I have vat 27%
Now, i need make copy all site, and locate into another country. On new copy i need change vat into 20%, but I need the price with VAT to remain the same.
Can I change all product prices via the database at once? I need to do "price * 1.27 / 1.2". Then I can change the VAT rate to 20% and the resulting prices will remain de facto unchanged.
Can anyone write me a sql command?
Yes you can - and I will ignore the very dubious practice of using a decrease in VAT to increase gross pricing :-)
You can do this with a direct database table update using SQL
You will also need to only apply to items that are subject to VAT (the update below DOES NOT DO THAT!)
update YOURTABLEPREFIX_virtuemart_product_prices as c
# NOW SET SOMETHING set p.product_price = round(p.product_price,2)
SET c.product_price = round(c.product_price * YOURCALC,2)
Take a table copy first :-)
Thx
See my adjustment above as you will need to only apply to items that are subject to VAT