SimpleCanadaTax
Use this component to calculate the Canadian Goods and Services Tax (GST) and Provincial Sales Tax (PST).
Note
- The SimpleCanadaTax component is a Site Server 3.0 Commerce Edition sample tax component. The SampleRegionalTax component is the sample tax component for Commerce Server 2000. Because all tax components in the product are intended only as samples, Microsoft strongly recommends that you have an independent tax professional verify all applicable tax rates and data generated by this component before you use such information for personal or business purposes.
Intended use: Order Processing pipeline, Tax stage.
Configuration Values
You can determine how the SimpleCanadaTax component calculates the tax by setting component properties. Use the following boxes on the Simple Canada Tax tab of the Component Properties dialog box to determine this information.
Box | Description |
Apply when | Determines when to apply the tax. The values are:
Always Default. Specifies that the tax is always applied to the order. Equal to country Specifies that the tax should be applied when the value of the Has any value Specifies that the tax is applied when the |
Country | The string to compare to the ship _to _country key in the order. |
GST Item Key | The key in the order form whose value is the GST rate. |
PST Item Key Prefix | A prefix that the SimpleCanadaTax component prepends to the name of the province to which the item is being shipped (from the ship _to _state key in the order form). The component uses this concatenated string to look up the PST rate on the order form. |
Province List | The space-separated list of provinces for which to compute the tax. |
Values Read
The SimpleCanadaTax component reads the following values from the indicated dictionaries.
Key | Dictionary | Description |
item._oadjust_adjustedprice |
Order | The total cost for an item. |
ship_to_state |
Order | The state to ship to. |
item._product_gst |
Order | Dynamic. Default shown. The GST for an item. The key name is determined by the value in the GST Item Key configuration box. |
item._product_pst__* |
Order | Dynamic. Default shown. The PST for an item in a given province. The province abbreviation is appended to the name and should match one in the ProvinceList box. The key name is determined by the value in the PSTItemKeyPrefix configuration box. |
ship_to_country |
Order | The country/region to ship to. |
Values Written
The SimpleCanadaTax component assigns values to the following keys in the Order dictionary.
Key | Description |
item._tax_total |
The total tax for items with this stockkeeping unit (SKU). |
item._tax_included |
The amount of tax included in the cost of the item. |
_tax_total_gst |
The total GST for the order. |
_tax_total_pst |
The total PST for the order. |
_tax_total |
The total tax for this order. |
_tax_included |
The amount of tax included in the cost of the order. |
Remarks
GST is common throughout Canada and almost all goods and services have a GST. If a product is taxed, the GST rate is the same throughout Canada. However, some products are not taxed and some service merchants (making less than a given amount) may elect not to charge GST. Each province has its own PST, usually a fixed rate for all products, but the PST rate still depends on the product (although a province may elect to tax an item not taxed by another province).
When shipping from one province to another you do not pay any PST. Although not common, a product may have a PST but not a GST. The reverse may also be true.
The data used by the SimpleCanadaTax component is usually provided by the QueryCatalogInfo or QueryProdInfoADO component. The SimpleCanadaTax component always sets the _tax
_included
keys to zero (0) for both the items and the order. The component does not handle fractions of base currency units. All calculations are rounded to the nearest whole unit.
The combination of the Key, Apply when, and Country boxes determine whether tax should be applied, but only if the order is being shipped to one of the provinces in the Province List box.
The SimpleCanadaTax component first checks the value in the Apply when box:
If it is set to Always, the tax is always applied to the order.
If the value in the Apply when box is set to Has any value, the tax is applied to the order whenever the order form contains any value for the
ship_to_country
key.If the value in the Apply when box is set to Equal to Country, the component does a comparison between the value of the
ship
_to
_country
key on the order form and the text string in the Country box. If there is a match, the tax is applied.
If the component determines that tax should be applied, it compares the value of the ship
_to
_state
key on the order form to the list of provinces specified in the Province List box. If there is a match, indicating the order is going to a province where tax is collected, the component does two things. First, it retrieves the GST rate from the field on the order form identified by the GST Item Key box. Second, it prepends the prefix specified in the PST Item Key Prefix box to the name of the province to which the item is being shipped (from the ship
_to
_state
key on the order form). The component then uses this concatenated string to look up the PST rate on the order form.
Example
To specify that a 2% GST tax rate and a 4.5% Alberta PST rate is charged for an item shipped to Alberta, Canada, do the following (assuming that you are using the QueryProdInfoADO component to retrieve product information):
- Add a column for the GST rate to your product table. The tax rate should be specified as a real number:
can_prod_gst_tax_rate real NOT NULL
- Add a column for the Alberta PST rate to your product table. The tax rate should be specified as a real number:
can_prod_pst_tax_rate_alb real NOT NULL
Assign tax rates to each product in your product table using an SQL script. For this example, assign the 2% GST tax rate and the 4.5% Alberta PST tax rate to Product ABC. Type 2.0 into the can_prod_gst_tax_rate column and 4.5 into the can_prod_pst_tax_rate_alb column in the Product ABC row.
Double-click the SimpleCanadaTax icon in the Pipeline Editor and enter the following in the resulting property page:
Box Value Apply when Has any value Country CAN GST Item Key _product_can_prod_gst_tax_rate PST Item Key Prefix _product_can_prod_pst_tax_rate Province List Alb
Note that if the user types a country/region or province on the order form that is not specified in the SimpleCanadaTax component configuration, the values will not be assigned to the _tax
_total
and _tax
_included
keys in the order and the items will not be set.