RequiredTaxCy, RequiredTax

Use these components to verify that total tax and tax included appear in the order form.

The RequiredTax component is for backward compatibility only. The RequiredTaxCy component operates in Site Server 3.0 Commerce Edition, Commerce Server 2000, and Commerce Server 2002 compatibility mode pipelines. For more information, see Currency Enhancements.

Intended use: Order Processing pipeline, Tax stage.

Configuration Values

None.

Values Read

The RequiredTaxCy component reads the following values from the indicated dictionaries. The RequiredTax component reads the same key but without cy_.

Key Dictionary Description
_cy_tax_total Order The total tax for the order.
_cy_tax_included Order The amount of tax included in the order.
MessageManager Context A reference to a MessageManager object that is used to retrieve the bad tax constant (pur_badtax) in case of an error.

Values Written

The RequiredTaxCy and RequiredTax components write the following value to the Order dictionary.

Key Description
_Purchase_Errors Error messages are written to this SimpleList object.

Errors

The RequiredTaxCy and RequiredTax components return error level 2 (OPPERRORLEV_WARN) when one of the tax items is missing. Other errors return error level 3 (OPPERRORLEV_FAIL).

The components also write an error message to the _Purchase_Errors collection. The components use a MessageManager order to retrieve error message text.

Constant Condition
pur_badtax One of the tax items is missing.

Remarks

The RequiredTaxCy and RequiredTax components perform the same actions although on different dictionary keys. The following discussion uses the keys for the RequiredTaxCy component.

The RequiredTaxCy component verifies that the _cy_tax_total and _cy_tax_included keys exist in the order form. If either value does not exist, the RequiredTaxCy component uses the pur_badtax constant to retrieve error message text from the MessageManager object and stores this message in the _Purchase_Errors collection of the OrderForm object.

See Also

MessageManager Object

Copyright © 2005 Microsoft Corporation.
All rights reserved.