Microsoft KB Archive/196250

= SimpleUSTax Component Only Computes Tax when Ship_to_state is Two Characters =

Article ID: 196250

Article Last Modified on 9/30/2003

-

APPLIES TO


 * Microsoft Commerce Server 2.0

-



This article was previously published under Q196250



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.</li></ol>

Additional query words: wallet

Keywords: kbprb KB196250

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.