Previous in Contents Next in Contents

Using the Tax Components

The Tax Stage and its components ensure that order._tax_total and order._tax_included are set. If not, an error is generated. If you are writing a custom tax processing component, be sure that your component sets both of these values when appropriate.

All components in the Tax stage will execute (unless a fatal error is returned). To cooperate, each component must check the resulting _tax_* values. If these values are already set, the component should return without doing anything. If the values are not set, the component will attempt to calculate the tax and if it is successful, set the _tax_* values.

In addition, the tax components must ensure that the value of _ship_to_country is set to the intended country; otherwise, the component will not execute. Furthermore, the OrderForm expects _tax_total to be set by the tax component. The tax component may set other name/value pairs during its execution, but in order for the stage to complete successfully, _tax_total must be set.

In each of the tax components, the country name must be specified as a parameter even though the name of the country is part of the name of the component (for example, SimpleCanadaTax). This is because the name of the component describes only the model for computing sales tax, and not the country to which it applies. For example, another country may actually use a tax model similar to Canada. Because the country name is specified, the tax model (and its corresponding component) can be used for more than one country.

Note  The tax components shipped with Commerce Server are provided only for evaluation and testing purposes only. 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.

Related Topics


© 1997-2000 Microsoft Corporation. All rights reserved.