Previous in Contents Next in Contents

FlagInventory

The FlagInventory component, which usually appears in the Inventory Stage of an order processing pipeline, determines whether any items on the order form are out of stock.

Remarks

This inventory component verifies that none of the order items have the _product_in_stock value, which corresponds to the in_stock column in the products database table, set to zero (0). If any item does have this field set to zero, FlagInventory sets _inventory_backorder to the quantity ordered (indicating the shortage). If such a shortage occurs and Disallow Backorder is set to one (1), FlagInventory will generate a pur_out_of_stock error in the _Purchase_Errors collection. This component interacts with a manual inventory control process; the product database must be updated to reflect the actual stock on hand.

Note  If you include the FlagInventory component in your pipeline, the product table in the database must contain a column named _in_stock , and the query that is executed in the Product Information stage must return the data from that column, otherwise, the component will fail.

When this component runs, it iterates through the items in the items SimpleList checking the value of the _product_in_stock field for each item. If the value for an item is zero (0), the component either writes an out of stock message to the order form's _Purchase_Errors list, or sets the value for the _inventory_backorder field, depending on whether the Disallow Backorder check box is selected.


© 1997-2000 Microsoft Corporation. All rights reserved.