Item or Item Group sales per hour

Hi everyone!

Has anyone attempted to make a report that lists menu items or group codes sales per hour? Ive made a draft but I am not sure if I like the layout. Any chance you guys have something slightly better that you would like to share? Even a suggestion on how to make it “cleaner” is appreciated.

[Sales:2, 4, 2, 2]
>>Time|Item|Total|%
@{REPORT ORDER DETAILS:O.ItemGroup,O.ExactTotal.sum.desc::{0}:,}
@{REPORT ORDER DETAILS:O.MenuItemName,O.ExactTotal.Sum.desc:(ODI=True):{0}:,}
>>$1
>{REPORT ORDER DETAILS:FT([O.Time],'hh').asc,O.MenuItemName,O.ExactTotal.sum,O.ExactTotal.Percent:(ODI=True) and (MG=$1)}

image

1 Like

Think the horizontal layout might be better.
Maybe dissect the overall hourly sales report knocking around for ideas.

I am not sure I am getting what you are trying to say :sweat_smile:

There is a sales per hour report with times going across on forum somewhere.
Perhaps that has some inspiration.

I know which one you mean but its just order counts, total and percentage.

Tricky part with categories you cant really list them like that. Because then you will have repeated hours with different categories.

10 - Beers
10 - Burgers
10 - Soft Drinks

I am wondering whether I can list time and then show categories that match that time? Something like O.Time="$1"

Are you talking about this ?

[Time Based Sales Report :1, 1, 1]
>Time|Order|Total
{REPORT ORDER DETAILS:FT([O.Time],'hh'),O.MenuItemName,O.Quantity.Sum.desc:(ODI=True):[=F({0},'##.00')]|{1}|{2}}

I think the best template would be something along the line of this

Until I figure out how to do something like O.Time="$1" … Or maybe use a setting to compare with time?

The best thing I can do is use the default product Tag to mark the items in bulk as Food, Drinks, Alcohol etc.

Then I use a Custom Tag called Category to subdivide them more into different more specific categories.

[Sales:2, 4, 2, 2]
>>Time|Item|Total|%
@{REPORT ORDER DETAILS:M.Tag,O.ExactTotal.sum.desc::{0}:,}
>>$1
>{REPORT ORDER DETAILS:FT([O.Time],'hh').asc,MT.Category,O.ExactTotal.sum,O.ExactTotal.Percent:(ODI=True) AND M.Tag="$1"}

image

Something like this maybe;

[Sales:2, 4, 2, 2]
>>Time|Item|Total|%
@{REPORT ORDER DETAILS:FT([O.Time],'hh').asc:(ODI=True)}
>$1
{REPORT ORDER DETAILS:MT.Category.asc,O.ExactTotal.sum,O.ExactTotal.Percent:(ODI=True) AND FT([O.Time],'hh')="$1"}

But doublt ‘(ODI=True) AND FT([O.Time],‘hh’)=“$1”}’ will work.
If noting else you could add an order state for ordered hour as state obviously is very easily report-able. Wouldnt backdate but would work going forward.

1 Like

That does list time but I dont think its a valid expression, dont get my hopes up like that haha :sweat_smile:

I know it will work with order states but I kinda want to backdate too :slightly_frowning_face:

Im sure I have seen a report constraint using column before now, but may be mistaken as can never find it when i try and lok for it.
Like

{REPORT ORDER DETAILS:FT([O.Time],'hh'),MT.Category.asc,O.ExactTotal.sum,O.ExactTotal.Percent:{0}=$1}
1 Like

I found some topic where Q was doing all sort of ingenious stuff and I found this, so I tried to use that almost last bit.

> -- Find customers who have non zero balances
> --                    :Fields to reutrn
> --                    |                  :Conditions (select the entity type I want to look for)
> --                    |                  |              :Although we are asking for 2 fields, only output the first one (index 0)
> --                    |                  |              |   :???Not sure what this section is for???
> --                    |                  |              |   |:Only output the value where the second field is not zero (the second field is the balance, even though it's not output)
> --                    |                  |              |   ||       :Use a comma to separate each field (useful because we will use this in another report)
> {REPORT ENTITY DETAILS:E.Id,E.Balance.sum:(ET=Customers):{0}::($2!=0):,}

So I gave it a go and it started giving a lot better outcome but something is still missing… :thinking::thinking:

[Sales:2, 4, 2, 2, 2]
>>Time|Item|Total|%
@{REPORT ORDER DETAILS:FT([O.Time],'hh').asc,O.ExactTotal.sum.desc::{0}:,}
>>$1
{REPORT ORDER DETAILS:MT.Category,O.ExactTotal.sum,O.ExactTotal.Percent:(ODI=True):::FT([O.Time],'hh')="$1":}

image

2 Likes

It’s giving same records for all hours. Misc group has $22.70 on 00,11 and 18. Did you manage to fix it?

There is no way to fix it as far as I remember so I used order states. I would assign {DATE:HH} order state on New Order Added rule and would report it like that. However you cant back date with this so…

image

[Category per Hour:1, 1, 1, 1]
>>Description|Order Count|Total|%
@{REPORT ORDER DETAILS:OS.TimeStatus.asc:(ODI=True):{0}:,}
>>$1:00
{REPORT ORDER DETAILS:O.ItemGroup,O.Quantity.sum,O.ExactTotal.sum,O.ExactTotal.Percent.desc:(ODI=True) and (OS.TimeStatus=$1)}

image

1 Like