Check For Stock In Other Locations When Saving An Order
Inventory Management is as equally important across multiple locations.
The last thing anyone wants to hear is a customer’s order was delayed due to a lack of inventory, especially when there was quantity in another location. The check-stock rule is a stored procedure, and business rule combination, which alerts the end user if they enter an item where stock may not be available at their location, but quantities are available at others. This ensures a positive check for available inventory happens before a request for purchase is issued.
The goal of the project is to help users who are entering orders to exhaust all means of trying to fill the customer’s order, without having to remember to look at stock availability in other locations. This rule does the work for them, notifying them only about lines they can potentially do something about.
SQL Stored Procedure
The stored procedure selects a count of locations, not equal to the current location, where the available inventory quantity is greater than zero. An optional custom field on the location record allows you to specify whether that location should be considered in the stock check rule. This allows you to exclude consignments, virtual locations, or other cases where you may not want that location’s inventory available for a stock check.
Business Rule: On Save Converter
If a line has a disposition ‘B,’ ‘S,’ or ‘D,’ the stored procedure checks “stock available” at other locations. If there is stock available, the business rule adds the line number as part of the message.
For Example, if there is a ten line order and 2, 5, 7 are available elsewhere, the user will be prompted with a Yes/No message box. The message will read: “Stock is available in other locations for lines 2, 5, 7. Do you want to continue saving?”
If yes is selected, the order saves with the current disposition. If ‘no’ is selected, the end user can go back and edit the order, making changes as needed to source from other locations.