Technote

(troubleshooting)
Tax is not being applied to an order calculation when setting up tax with multiple fulfillment centers in WebSphere Commerce
Problem(Abstract)
In WebSphere Commerce V6, WebSphere Commerce Accelerator does not support tax setup with multiple fulfillment centers. In this scenario, taxes are not calculated on an order.
Cause
Although you have created a new fulfilment center, the tax interface in WebSphere Commerce Accelerator still applies tax changes to the original fulfilment center.

For example, look for the following code:

com.ibm.commerce.order.calculation.TaxCalculationRuleQualifyCmdImpl.isQualified taxRuleIds(fulfillmentCenterId=10201 ,jurisdictionIds={13506})={}

However, there is no record with fulfillmentCenterId = 10201 in the table TAXJCRULE. The table TAXJCRULE is used by Commerce tax CalculationRuleQualifyMethod to select a CalcuationRule when shipping from a FulfillmentCenter to a shipping address that matches to one of the TaxJurisdictions in a particular TaxJurisdictionGroup. As a result, no calrule is qualified, and no tax change is applied to an order.

This is a known issue and is due to the fact that such setup is not supported by default on WebSphere Commerce Accelerator, or other tools in WebSphere Commerce, to configure data properly. An enhancement to WebSphere Commerce tool is currently under consideration for future release.

Resolving the problem
Define the tax data for a new fulfilment center:

You need to create relationship between the tax code and category pair, so for each one, add a record in the following tables:


For the new calrule record, insert a new record in the calrule table:
calrule_id=<a new id>
calcode_id = <the tax code's id>
taxcgry_id = <the category id>
identifier = <calrule_id>
For the new taxjcrule, insert a new record in the taxjcrule table:
calrule_id= <the new defined calrule_id>
ffmcenter_id = <the new fulfillment center id>
run the sql: select JURSTGROUP_ID from JURSTGPREL where JURST_ID = <the current jurst_id>
JURSTGROUP_ID=<the result of the above sql>

Create a new calscale for this calrule:
CALSCALE_ID=<new id>
CODE=CALSCALE_ID
STOREENT_ID=<the id of the current store>
CALUSAGE_ID=-3
CALMETHOD_ID=<for sales tax, -53; for shipping tax, -73>

Create a new crulescale:
CALSCALE_ID =<the new calscale id defined above>
CALRULE_ID = <the new calrule id defined above>

Create a new calrange for this calrule:
CALRANGE_ID =<new id>
CALSCALE_ID =<the new calscale id defined above>
CALMETHOD_ID=<for sales tax, -59; for shipping tax, -77>
RANGESTART = 0.00000
CUMULATIVE =0

Create a new calrlookup for this calrule:
CALRLOOKUP_ID=<new id>
CALRANGE_ID=<the value of the new calrange_id>
VALUE=<the tax rate to define>
SETCCURR =<If specified, this is the currency of the monetary amount in the VALUE column. For example: 'USD' >

The data models are described in the online help:

Calculation rule - tax data model

http://publib.boulder.ibm.com/infocenter/wchelp/v6r0m0/topic/com.ibm.commerce.data.doc/refs/rdmcalrulet.htm


Calculation scale data model

http://publib.boulder.ibm.com/infocenter/wchelp/v6r0m0/topic/com.ibm.commerce.data.doc/refs/rdmcalsc.htm
 

Document Information

Current web document: http://www.ibm.com/support/docview.wss?uid=swg21258066