Use this component to calculate the Canadian Goods and Services Tax (GST) and Provincial Sales Tax (PST).
- 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 and Commerce Server 2002. 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.
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.
|Apply when||Determines when to apply the tax. The values are:
|Country||The string to compare to the |
|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 |
|Province List||The space-separated list of provinces for which to compute the tax.|
The SimpleCanadaTax component reads the following values from the indicated dictionaries.
|Order||The total cost for an item.|
|Order||The state to ship to.|
|Order||Dynamic. Default shown. The GST for an item. The key name is determined by the value in the GST Item Key configuration box.|
|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 Province List box. The key name is determined by the value in the PST Item Key Prefix configuration box.|
|Order||The country/region to ship to.|
The SimpleCanadaTax component assigns values to the following keys in the Order dictionary.
|The total tax for items with this stockkeeping unit (SKU).|
|The amount of tax included in the cost of the item.|
|The total GST for the order.|
|The total PST for the order.|
|The total tax for this order.|
|The amount of tax included in the cost of the order.|
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
- If the value in the Apply when box is set to Equal to Country, the component does a comparison between the value of the
countrykey 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.
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 _
total and _
included keys in the order and the items will not be set.
All rights reserved.