WHMCS – How To Change Tax Rate

WHMCS – How To Change Tax Rate

From time-to-time governments change the sales tax rates, this is significant as you must also update your rates accordingly.

For the purposes of this example the UK sales tax – called VAT – is being increased from 17.5% to 20% on 4th January.

This means that at midnight on Monday 3rd January, or at the latest before the cron run on the 4th for generating new invoices, you will want to update the tax rules in your WHMCS installation so that new orders and invoices use the higher rate. This is possible through the WHMCS admin interface under Setup > Tax Rules:

  • Delete the original tax rule by clicking the corresponding red delete icon,
  • Create a new tax rule with exactly the same country and state but enter the new tax rate.

That’s all there is to it, any invoices generated after this change will have the new tax rate applied, but any existing invoices will keep the old tax rate.

If you have multiple separate rules this method can be time-consuming, so this can be done in-bulk by running an SQL update query as follows on your WHMCS database via a tool such as phpMyAdmin:

UPDATE tbltax SET taxrate=20 WHERE taxrate=17.5;

Existing invoices will not be affected by this and will keep the 17.5% tax rates they were originally generated with. This will just mean that for any invoices generated after the change, use the new higher 20% tax rate.

If you also wish to update existing but unpaid invoices generated before the 4th but due on or after it, then you can use this query to do that:

UPDATE tblinvoices SET taxrate=20,tax=subtotal*0.2,total=subtotal+tax-credit WHERE status='Unpaid'
AND taxrate=17.5 AND duedate>='2011-01-04';

Was this article helpful?

Related Articles

Leave A Comment?

You must be logged in to post a comment.