A simple method to limit a Menu Item being sold beyond availability. This does not track actual Physical Inventory, but can be used for many cases such as a daily special for something like Soup.
FLOW:
In this example, we have defined 2 different soups, each with their own limited Quantity.
At start of Work Period we are prompted for Item Count: (we enter 10 and 15)
When 10 Onion soup have been ordered, we are prevented from ordering any more:
When 15 Tomato soup have been ordered, we are prevented from ordering any more:
SETUP
There is a catch with this simple Setup that you should be aware of:
You can not add a Soup, then select/highlight it, then use the
+/-
buttons to increase/decrease the Quantity
Action - Update Program Setting
Item Count:
Setting Name: ItemCount_[:ItemName]
Setting Value: [:count]
Update Type: [:updateType]
Is Local: False
Action - Cancel Order
:
Only Last Order: True
Action - Execute Automation Command
:
Automation Command Name: [:AMCname]
Command Value: [:AMCvalue]
Delay: 0
All Rules need a Default Mapping
Rule - Work Period Started Set Item Count:
Event Name: Work Period Started
Execute Rule if: Matches
Custom Constraints: (none)
AC LI Update Program Setting Item Count:
Constraint: (none/blank)
ItemName: Onion Soup
(this should exactly match the name of a Product)
count: [?How many Onion soup do we have today;;;ON]
updateType: Update
AC LI Update Program Setting Item Count:
Constraint: (none/blank)
ItemName: Tomato Soup
(this should exactly match the name of a Product)
count: [?How many Tomato soup do we have today;;;ON]
updateType: Update
Rule - Order Added Decrease Item Count:
Event Name: Order Added to Ticket
Execute Rule if: Matches Any
Custom Constraints:
Menu Item Name
Equals Onion Soup
Menu Item Name
Equals Tomato Soup
AC LI Update Program Setting Item Count:
Constraint: (none)
ItemName: [:MenuItemName]
count: [=TN('{QUANTITY}')]
updateType: Decrease
AC LI ExecAMC:
Constraint: (none)
AMCname: LI Check Item Count
AMCvalue: [=TN('{SETTING:ItemCount_[:MenuItemName]}')]
Rule - RU LI Check Item Count
Event Name: Automation Command Executed
Execute Rule if: Matches
Custom Constraints:
Automation Command Name
Equals LI Check Item Count
Command Value
Less 0
MSG TEST: (this is a generic Show Message
Action)
Constraint: (none)
MessageToDisplay: Not currently available: [:MenuItemName].\rYou ordered:{QUANTITY}\rWe have:[=TN('{SETTING:ItemCount_[:MenuItemName]}')+TN('{QUANTITY}')]\rCanceling Order.
AC LI Cancel Order:
Constraint: (none)
Rule - Order Cancelled Increase Item Count:
Event Name: Order Cancelled
Execute Rule if: Matches Any
Custom Constraints:
Menu Item Name
Equals Onion Soup
Menu Item Name
Equals Tomato Soup
AC LI Update Program Setting Item Count:
Constraint: (none/blank)
ItemName: [:MenuItemName]
count: [:Quantity]
updateType: Increase
DB Tools Import File:
LimitItemSales.zip (1.4 KB)
You will need to edit the Rules to contain your applicable Product Name(s).