As thread title suggest this is not working correctly.
@Jesse, I don’t think this is an issue. It is counting records, in this case Order Lines, which is correctly 11.
Is there a {REPORT ORDER QUANTITY SUM:X}
or similar? If there is, you should use it instead.
COUNT is a Count of Orders (Order lines); it’s not a Sum of Quantities.
Or look for a sum or count of Product / MenuItem Quantity on a Ticket-level.
It depends on how its meant to be used. I really think its meant for Order Counts… not order lines because the expressions for it pertain to Menu Items
Perhaps your right… I will look into it further.
Maybe my assumption is wrong, but I believe Report Tags are just a “friendly” way to create SQL, which under the hood is what I believe is happening. If that is the case, the result is correct, because it is counting Order lines, rather than the Quantity field that is part of the same table [Orders]
.
I just did a good example of this (in SQL) on another Topic. In the first query we’re counting tickets using COUNT()
, but he wanted counts of Burgers sold, so we had to query the [Orders]
table, but not use COUNT()
which counts records; instead use SUM()
of the [Quantity]
field.
I do not need this anyway I am just getting familiar with all Report tags.
If I’m not correct, then the Tag is misnamed.
Right now this does not exist… So either I was right… or I was wrong and we are just missing syntax.
Try this one - it looks like @emre has decided to use TOTAL to indicate a SUM …
{REPORT ORDER TOTAL:<expression>}
EDIT: that appears to pull the Total Cost (properly: Quantity * Cost
). We likely need a tag something like:
{REPORT ORDER QUANTITY:<expression>}
{REPORT ORDER QUANTITY TOTAL:<expression>}
added for next release.