Where current WP data stored? (consumption eth.)

where does the report come from Warehouses menu?
the [PeriodicConsulationItems] table is recorded only after the WP is closed.
Where is the data for the current WP stored and is it possible to get this data using jscript?

It’s not stored it’s derived from purchases and eod records.

did I understand you correctly?
in current WP:
Consumption = today odrer*recipe

that is, throughout the day, does it each time count all the orders for today and compare them with recipes?

No that’s not what I said. I’ll have to look up conversations we had with Emre to be sure.

What do you mean with jscript? You can use report tags you wouldn’t need jscript.

Consumption would be based off the multiplier in the recipe yes. It will consume an amount even if you made no purchases.

It would be better if you let us know what your trying to do.

What do you mean with jscript? You can use report tags you wouldn’t need jscript.

I want to make a setting now that does not allow to sell goods which are not in stock.
like “out of stock”
only not for direct products like “cola = cola”.
and which, with the help of scripts, checked the recipe and issued a warning when some ingredient ended.

That’s been done already. There are tutorials for it.

constantly use search.
but did not find the instruction in which this function was made. with the condition that in the recipe more than one ingredient.
if I missed something, please tell me how to find it.

It’s there I know Rickh used it. You may be searching the wrong terms. I’m busy atm or I would.

Let me get home and Ill copy and paste few bits

So you can create new rule with Event Name: Order Added to Ticket.

You can add something similar to this line to your custom constraint.
[=TN('{REPORT INVENTORY:{ITEM TAG:Alert}:Local Warehouse}')-TN('{TICKET ORDER QUANTITY TOTAL EXP:(MN=[:MenuItemName]) && (OS.Status=New)}')]

What happens (actions) when your constraint is true is up to you. Mine just shows “You have less that x amount of Coke in stock”

P.S. This is for “realtime” counting of the inventory stock items. If you are running these across several terminals + several warehouses you might need a really strong server to handle that otherwise you will experience a drop in performance.

As far as Ive tried and seen inventory consumption details like C.Name, C.Unit, C.Prediction tags pull info from the EODR.

In my experience when you listed them with @ and change the date filter this week it would give you every single item from every single end of day record within that date range. Now I might have been doing something wrong but that’s what I got and thats why I think it works that way.

this only works for single ingredient recipes.
I also need a multi-ingredient recipe to check.

Well I copied what I use in some of my setups in case it helps you, its up to you to build something on top of that.

Hi @bezdelmax I’ve been off for a while I’ll check my system and show your my config for stopping OOS items being added to the ticket

thank you, but not relevant.

messages from Emre, this is a repository of undeclared functions. LOL

Now I do not use the general search, I am only looking for messages from Emre.
System setup went faster)

Very relevant I would have thought as I have a setup that does exactly what you have asked above, but no worries

A list of undeclared functions is only so much use without real world in use examples but hayho

What do you mean messages from Emre?