Changing Tax Rates on Existing Invoices

From WHMCS Documentation

Sometimes, governments change the sales tax rates. This is significant, since you must also update your rates accordingly.

Changing the Tax Rate

The instructions below use an example in which the tax rate is increasing from 17.5% to 20% on January 4th.

When you change the tax rate, make sure to do this at midnight or at the latest time possible before the cron job runs on the day of thee change (for example, January 3rd).

Any invoices that the system generates after this change will use the new tax rate, but any existing invoices will keep the old tax rate.

In the Tax Configuration Interface

To change the tax rate in WHMCS:

  1. Go to Configuration () > System Settings > Tax Configuration or, prior to WHMCS 8.0, Setup > Payments > Tax Configuration.
  2. Delete the original tax rule.
  3. Create a new tax rule using the same country and state with the new tax rate. New orders and invoices will use this higher rate.

SQL Update Query

If you have multiple separate rules, using the interface may become time-consuming. You can do this in bulk by running an SQL update query on your WHMCS database using a tool like phpMyAdmin:

UPDATE tbltax SET taxrate=20 WHERE taxrate=17.5;

This won't affect existing invoices and they will retain the 17.5% tax rates they had when the system generated them. However, any invoices that the system generates after the change will use the new 20% tax rate.

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

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';