So how can we report ALL Inventory by Group Code using standard tags:

{REPORT CONSUMPTION:x} does not reference the all important GROUP CODE so during Stock Take staff must follow an A-Z list and not Location :frowning_face:

{REPORT COST:x} does reference Group Code but only selects Stock Sold in a Work Period or greater.

So I am officially making this a request seems there are no other options.

@emre if you still out there :cold_sweat:

Report: Entry by Warehouse and Product Group

Ok this officially could be tricky?
At first I thought I could JOIN Inventory Items WITH Period Consumptions and selecting the highest Period calculating Count LESS consumption.

Unfortunately this does not consider current period Sales like TAGS {REPORT INVENTORY} and {REPORT CONSUMPTION DETAILS}.

Bummer :confounded:

To be precise I need to produce this:


Ok after about 10 hours straight, working through the DBO, searching the forum, bashing some jscript we have this:

The {CALL} throws the output to a jscript parser that; runs a SQL query to select GROUPS; then runs through a MATCH; sorts the Result; trims the Result to remove Groups; creates some Headers; JOINS the lot back together; and finally returns the Result set like a Samba Report.

Really :confounded:

So @QMcKay when he arrives will do this in 1 SQL line :scream: and I still would prefer that syntax over mine but the current Orders not included in Consumptions was always going to be the trick…

My head hurts lol.


Nothing changed?
I am now doing the most automated setup
And I want a flaw in the audit automatically split by flow in terms of money
something like this:
C.In Stock - C.Physical Inventory * C.Cost = deficit ($)
but to divide it into flow (sushi,pizza,bar), I need expression
something like this:


okay, I.GroupCode work like a field.
but logically it should not work as expression (and does not work) because “I.GroupCode” takes data from another table.

how to force it to work in one line that data could be used in rules?

I think @emre would recommend using a script.:sweat_smile:
But I, as always, do not have enough knowledge of Jscript


Your question is not clear but I think you can try (MG=bar)




ups… not work.
MG - is Order Menu Item Group
i need Inventory Item Group


@bezdelmax I.GroupCode expected to work. it will be awesome if you can let us know how you’ve used I.GorupCode and determined it does not work. Maybe you made a syntax error…


I decided to make sure that it does not work. and found the right solution :smile:

I.GroupCode=“Group Code” - expression work (I forgot about quotes).

@pauln if it’s still important for you, then it works:



[$1 Stock:2,1,1,1,1]
{REPORT CONSUMPTION DETAILS:C.Name,C.Unit,C.Added,C.Consumption,C.Prediction:I.GroupCode="$1"}

This should work.

However, I am not sure where to insert >Name|Unit|Add|Sold|Prediction

If I make it like this it breaks listing of the report

[$1 Stock:2,1,1,1,1]