Stop selling out of stock items

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?

image

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.
1

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.

That’s the issue, in each case it return null :expressionless:

If they both return null then something else is wrong as how can a valid inventory query return null?
What’s the Russian bit after {NAME}? (Sorry if it not rusian, being a bit presumptive)
I’ve never delved to deep into inventory so not best one to help.

It is warehouse name. Локальный склад-Local warehouse

Run some tests twweking that expression. I would expect it to return something other than null if inventory were setup correctly and expression correct.
There are several name type {} expressions so try some of the others.
Maybe try hardcoding a name.
Also not sure if it would require inventory item to have exact name of product for you example to work. Don’t know if it would resolve inventory from order/product name like that is inventory item is named differently.