Export (0) Print
Expand All
Expand Minimize

SimpleCanadaTax

Commerce Server 2002

Use this component to calculate the Canadian Goods and Services Tax (GST) and Provincial Sales Tax (PST).

Ee783679.note(en-US,CS.20).gif 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 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.

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.

BoxDescription
Apply whenDetermines 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 ship_to_country key in the Order dictionary is the same as the string specified in the Country box.
Has any value
Specifies that the tax is applied when the ship_to_country key of the order has any non-null value.
CountryThe string to compare to the ship_to_country key in the order.
GST Item KeyThe key in the order form whose value is the GST rate.
PST Item Key PrefixA 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 ListThe space-separated list of provinces for which to compute the tax.

Values Read

The SimpleCanadaTax component reads the following values from the indicated dictionaries.

KeyDictionaryDescription
item._oadjust_adjustedpriceOrderThe total cost for an item.
ship_to_stateOrderThe state to ship to.
item._product_gstOrderDynamic. 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__*OrderDynamic. 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.
ship_to_countryOrderThe country/region to ship to.

Values Written

The SimpleCanadaTax component assigns values to the following keys in the Order dictionary.

KeyDescription
item._tax_totalThe total tax for items with this stockkeeping unit (SKU).
item._tax_includedThe amount of tax included in the cost of the item.
_tax_total_gstThe total GST for the order.
_tax_total_pstThe total PST for the order.
_tax_totalThe total tax for this order.
_tax_includedThe 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):

  1. 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
  1. 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
  1. 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.
  2. Double-click the SimpleCanadaTax icon in the Pipeline Editor and enter the following in the resulting property page:
    BoxValue
    Apply whenHas any value
    CountryCAN
    GST Item Key_product_can_prod_gst_tax_rate
    PST Item Key Prefix_product_can_prod_pst_tax_rate
    Province ListAlb

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.

Copyright © 2005 Microsoft Corporation.
All rights reserved.
Show:
© 2015 Microsoft