Our taxation engine has been designed to accommodate all different types of global taxation rules. The global taxation engine works by creating a Tax Rule made from Tax Classes and Tax Rates.
The three main entities used to determine the tax rates to use are:
Tax classes - Categories or classifications that you can set against your products and accounts.
Tax rates - A percentage amount of tax that you’d like to apply in a particular country, state, or postcode.
Tax rules - A combination of both tax classes and rates that used to calculate the appropriate tax charge amount.
Once all the rates have been determined the tax will be derived by a collection of 'regular' tax and 'compound' taxes of the original taxable amount.
For example, you might have a tax rule called “Standard Tax” that applies your tax rate “Standard Sales” of 10% when products have the tax class “Standard”.
Get started
Head to System Setup and add tax rates, rules, and classes under the “Taxation” heading.
For further information on Tax Configuration click here: TAX Config Guide
Tax will be calculated on each item on the order, the technique used being determined by the 'Tax calculation method based on' set against the company. Each setting will basically define a different 'rounding' method to use when calculating the tax.
1. The first step, when calculating the tax, will be to determine all the tax rules that apply. This can be achieved by looking for all the tax rules that contain a product tax class (for the product/service or surcharge) and an account tax class for the account set against the order. This list of rules will then be sorted in ascending priority order and then enumerated to find all the corresponding rates.
2. Now enumerate all the rules and compile a set of all the rates that need to be applied. When doing this, we need to record the rate and the priority of that rate (from it's rule). The rates used will be determined by the location details for the rate, including those that match the location information against either the orders account or delivery address (company option Tax Calculation Based On). When compiling the list of rates, if the collection already contains that rate (different rules can contain the same rate) then we only add to the collection if the priority is different (the unique constraint here is the rate and priority). Once this is done we'll have a collection of rates that need to be applied with their associated priority.
3. Order the collection of rates in priority order so that the lower number priorities are processed first.
4. We now need to apply the rates to the taxable charge (either pre or post discount based on the company option Apply Customer Tax) using the algorithms defined above applying the appropriate rounding technique defined. If we have more than one rate to apply then we need to calculate the tax using the following technique:
When calculating the tax, if we find multiple adjacent rates in the collection that have the same priority then the tax calculations will be added together (regular tax). If the priority of adjacent rules are not the same (the current one is higher) then the tax calculations will be compounded (compound tax). For the Order Total technique the running delta's will need to be recorded for each of the different rates against the order header. These delta's can then be applied and updated when performing the individual rate tax calculations.
5. Note; the company options (Tax Calculation Method Based On, Tax Calculation Based On and Apply Customer Tax) will be recorded against the order when the order is created. These parameters will then be used when calculating the tax for the items on the order. This will prevent company changes effecting the charge of an existing order.
6. Note; when calculating charges and tax the zeroPricedFlag and discountableFlag on the order item will be used and NOT that stored against the product/service. Again, this is to prevent changes to the product/service effecting the charge of existing items on orders.