Stop selling out of stock items

I found a message by Emre posted in far 2014 that they plan to add a function that can be used to limit sales of each product and its portions.

Stop negative stock!?:

Do we have that function now in V5?

Yes but it’s not built in you will have to build it yourself. There are a few examples on the forum if you do a search you may find them.

By using inventory and creating receipes?

It’s not a built in feature so you will have to build it with rules and actions and new report tags available in v5

That would be a logical route or you can create something to just keep a plu/product stock count using custom product tags if you just want a simple limit on menu items without full inventory.

I tried to use product tags, but couldn’t find a way to update them correctly when product is placed to ticket. Sometimes, people need to limit selling of particular products like ice cream. For example, at the beginning you have 100 ice creams and you enter 100 somewhere related to ice cream, and when you sell 100 of it, its button becomes disabled.

I’ve tried tutorials with inventory report and rules, but it’s too complicated for end user. For limiting sales of 1-2 items, user should create receipes and inventory items with the same name for all products

You wont be able to disable button but is possible to use header to display stock level and show message and cancel order when added.
My sugestion before about product tags may not be posible, forgot there isnt an easy way to update from automation.

So you want an on the fly setting you can do and it resets each day?

Not for all products. just those ones you want to do stock for…

If its just for 1 or 2 products you could just use a program setting.

It seems i made something wrong then.

What exactly in program settings you mean?


Custom settings.
Value can be called with {SETTING:xxx} where xx is setting name.
Is Local would want to be false making it a global value stored in DB rather than local terminal cache.

1 Like

Oh, thanks a lot. I will definitely try with it.

Dont use increase decrease option, it often doesnt work as expected.
Do a sum so update using current value -1 one like [=TN(’{SETTING:IceCreamStock}’-1]

Is there any time or quantity limit to store settings?

Local are stored in cache and cleared on samba restart. Global (Is Local=False) are stored in database and persistent until updated/cleared.
If related products are predefined you could use custom entity screen to show and update. The setting field for entity screen is for local so would need custom setup. Alternatively you could look at some way to update maybe from an order level automation command.

How that can be implemented? Now, i am using inventory for that and applied action and rules. However, products that are not created in Inventory Items cannot be placed to ticket.

If you are using inventory I could check and see if there is different value returned for items which are not set in venventory and those that are.
I would expect no inventory setup may return null vs 0 but never tested.
If that were the case you may be able to allow unconfoguered by adding the same value again and setting is not null for constraint.