Difference between revisions of "Changing Tax Rates on Existing Invoices"

From WHMCS Documentation

(Created page with "Sometimes, governments change the sales tax rates. This is significant, since you must also update your rates accordingly. ==Changing the Tax Rate== <div class="docs-alert-i...")
 
 
Line 4: Line 4:
  
 
<div class="docs-alert-info">
 
<div class="docs-alert-info">
<span class="title">Examples</span><br />
 
 
The instructions below use an example in which the tax rate is increasing from 17.5% to 20% on January 4th.
 
The instructions below use an example in which the tax rate is increasing from 17.5% to 20% on January 4th.
 
</div>
 
</div>
Line 15: Line 14:
  
 
To change the tax rate in WHMCS:
 
To change the tax rate in WHMCS:
# Go to '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > [[Tax Configuration]]''' to update your WHMCS tax rules. New orders and invoices will use this higher rate.
+
# Go to '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > [[Tax Configuration]]''' or, prior to WHMCS 8.0, '''Setup > Payments > Tax Configuration'''.
 
# Delete the original tax rule.
 
# Delete the original tax rule.
# Create a new tax rule using the same country and state with the new tax rate.
+
# 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===
 
===SQL Update Query===

Latest revision as of 18:47, 19 April 2022

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