SimpleUSTax Component Only Computes Tax when Ship_to_state is Two Characters
ID: Q196250
|
The information in this article applies to:
-
Microsoft Commerce Server versions 2.0, 3.0
SYMPTOMS
The SimpleUSTax component in the Purchase pipeline only computes tax when
the ship_to_state is two characters. In the Microsoft Wallet form and in
many forms, it is not a requirement to use a two character state
abbreviation. For example, if Alabama is entered in the state field of the
wallet and the SimpleUSTax component specifies AL 6.0%, no tax is charged
on the order.
WORKAROUND
To work around the above issue, use a Scriptor component that pre-
processes the orderform.ship_to_state before the SimpleUSTax component is
run. For example:
- Open the Purchase.pcf file in the Pipeline Editor for the store.
- Right-click on the SimpleUSTax component, choose to insert the
component, and then choose the Scriptor component.
- Double-click the Scriptor object and select the Component Properties
tab. Change the label to "Pre-processing of ship_to_state."
- Click the Scriptor tab and choose Edit.
- Copy and paste the following example over the existing script (Note,
you can change the states to fit your needs):
function MSCSExecute(config, orderform, context, flags)
select case ucase(orderform.ship_to_state)
case "ALABAMA"
orderform.ship_to_state = "AL"
case "NORTH CAROLINA"
orderform.ship_to_state = "NC"
end select
MSCSExecute = 1
end function
sub MSCSOpen(config)
end sub
sub MSCSClose()
end sub
- Run through the Plan.pcf file by adding items to your basket and
totaling the order.
- Verify that the state tax is properly computed based on the state that
is used.
Additional query words:
wallet
Keywords :
Version : WINNT:2.0,3.0
Platform : winnt
Issue type : kbprb