SimpleJapanTax

Use this component to compute taxes according to the Japanese tax model.

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

  • The SimpleJapanTax 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 SimpleJapanTax component calculates the tax by setting component properties. Use the following boxes on the Simple Japan 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 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.

Country The string to compare to the ship_to_country key in the order to determine if tax is applied.
Include Item Key The key in the Item dictionary that indicates whether or not tax is already included in the price of the item.
Rate Item Key The key in the item that contains the tax rate charged for the item.

Values Read

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

Key Dictionary Description
item._oadjust_adjustedprice Order The total cost for an item.
item._product_jpn_tax_included Order Dynamic. Default shown. A Boolean indicating whether tax is already included in the item cost. The key name is determined by the value in the IncludeItemKey configuration box.
item._product_jpn_tax_rate Order Dynamic. Default shown. The tax rate for an item. The key name is determined by the value in the RateItemKey configuration box.
ship_to_country Order The country/region to ship to.

Values Written

The SimpleJapanTax 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 SimpleJapanTax component computes a tax rate for the Japanese tax model. It can be used for any country/region that uses a similar model. The component handles fractions of currency units only at the item level; order-level calculations (order._tax_total and order._tax_included) are rounded to the nearest whole unit.

The combination of the values in the Key, Apply when, and Country boxes determines whether tax should be applied, but only if tax is not already included in the price of the item.

The SimpleJapanTax 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 compares the value of the ship_to_country key on the order form and the text string in the Country box on the property page. If they match, the component applies the tax whose value is stored in the box specified in Rate Item Key.

The key in the IncludeItemKey box specifies the name of the field in the Item dictionary that indicates whether tax is already included in the price of the item. This field is assumed to contain a Boolean value that indicates whether or not the tax rate is to be added to the line item (in which case the item._tax_total key is set to the tax amount and the item._tax_included key is set to zero), or whether the tax rate is included in the price (in which case the item._tax_included key is set to the tax amount and the item._tax_total key is set to zero).

Example

To specify that a 9.54% tax rate is included in the price of an item and is not included in the price of another item for items in Japan, do the following:

  1. Add a column for the included tax rate to your product table. The tax rate should be specified as a smallint number:

jpn_prod_tax_included   smallint  NOT NULL,

  1. Add a column for the tax rate to your product table. The tax rate should be specified as a real number:

jpn_prod_tax_rate       real     NOT NULL,

  1. Assign tax rates and tax included values to each product in your product table using an SQL script. This example uses two products, Product Included and Product Excluded. Assign Product Included the 9.54% tax rate with the tax included in the product price. Type 9.54 into the jpn_prod_tax_rate column and 1 (True), in the jpn_prod_tax_included column in the Product Included row. Assign Product Excluded the 9.54% tax rate with the tax not included in the product price. Type 9.54 into the jpn_prod_tax_rate column and 0 (False), in the jpn_prod_tax_included column in the Product Excluded row.

  2. Use the Pipeline Editor to enter the following in the property page of the SimpleJapanTax component:

    Box Value
    Apply when Has any value
    Country JPN
    Include Item Key _product_jpn_prod_tax_included
    Rate Item Key _product_jpn_prod_tax_rate

If the user types a country/region in the order form that is not specified in the SimpleJapanTax component configuration, the _tax_total and _tax_included keys on the order and on the items will not be set.


All rights reserved.