Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 3 of 3

Thread: UK VAT Increase

  1. #1
    jazzylily is offline Member
    Join Date
    Nov 2007
    Posts
    36

    Default UK VAT Increase

    For one of my stores i would like to keep the prices the same with the VAT increase. Is there an easy way to change the net price of all products across the store?

  2. #2
    webopius is offline Senior Member
    Join Date
    Nov 2008
    Location
    London, UK
    Posts
    440

    Default

    Hi,

    Looks like the clock's ticking for you on this one!

    The quickest way to do this would be to run a SQL query to update all product prices en-mass but proceed with extreme caution and backup everything beforehand.

    ***Important disclaimer***
    Please run the SQL below at your own risk. Run on a development database before you run it on a live system. I have just written this quickly for you and it's not tested fully, no guarantee or liability etc etc....

    This SQL is based on the situation where all your taxable products are rated at 17.5% and stored in ASPDotNetStorefront excluding VAT. It should update all taxable products so that when the new 20% VAT rate is applied, the gross price remains the same.

    For example:

    Current product price shown to the customer: £10.00
    At 17.5% VAT, product price is stored in the ASPDotNetStorefront database as £8.5106

    After running the script, the database value is now £8.3333
    Once the VAT rate is changed to 20%, this displays to the customer as £10.00

    OK, here's the SQL...

    Code:
    update ProductVariant 
    set Price = ((Price*1.175)/120)*100
    where IsTaxable = 1
    
    update ProductVariant 
    set SalePrice = ((SalePrice*1.175)/120)*100
    where isnull(saleprice,0) > 0
    and IsTaxable = 1
    Don't forget to change your tax rates to 20% in the admin (Taxes -> edit countries) and once again, please test this on a safe database before trying it live.

    Hope this helps, get in touch if you need any help. As you can imagine, we are pretty busy changing prices for clients in the UK.

    Adam
    Webopius.com

  3. #3
    jazzylily is offline Member
    Join Date
    Nov 2007
    Posts
    36

    Default

    Thanks so much for posting this for me. Probably shouldnt have left it until the last minute.