Share via


SimpleUSTax

Use this component to apply taxes on any order sent to a specified state in the United States.

Ee825300.note(en-US,CS.10).gif Note

  • The SimpleUSTax 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 SimpleUSTax component calculates the tax by setting component properties. Use the following boxes on the Simple United States 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 ship_to_country key in the Order dictionary is the same as the string specified for 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.

Country The string to compare to the ship_to_country key in the order.
State Rate List The list of states and tax rates, in the form state:rate, with state as the two-character postal code abbreviation and rate expressed as a decimal value. For example WA:8.6 is an 8.6% tax rate for the state of Washington. Multiple state and rate pairs are separated by spaces.

Values Read

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

Key Dictionary Description
ship_to_state Order The state to ship to.
item._oadjust_adjustedprice Order The total cost for an item.
ship_to_country Order The country/region to ship to.

Values Written

The SimpleUSTax 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 The total tax for this order.
_tax_included The amount of tax included in the cost of the order.

Remarks

The SimpleUSTax component calculates state taxes within the United States.

The combination of the values in the Key, Apply when, and Country boxes determine whether tax is applied, but only if the state to which the order is shipped appears in the State Rate List box.

The SimpleUSTax component first checks the Apply when value:

  • 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 on this property page. If there is a match, the component applies the tax.

If the component determines that tax should be applied, it then compares the value of the ship_to_state key on the order form to the list of states specified in State Rate List box. If there is a match, indicating that the order is being shipped to a state where tax should be collected, the component applies the tax rate for that state, and sets the values for the item._tax_total, item._tax_included, order._tax_total, and order._tax_included keys.

The SimpleUSTax component always assigns zero (0) to the _tax_included keys for both the item and the order. The component does not handle fractions of base currency units; all calculations are rounded to the nearest whole unit.

If the user types a country/region or state in the order form that is not specified in the SimpleUSTax component configuration, the values of the _tax_total and _tax_included name/value pairs on the order and on the items will not be set.

You can enter an at sign (@) (the wildcard character) to represent all states that are not explicitly listed (for example: @:0).


All rights reserved.