Help with Department sales report

[Sales:1,2,1,1]
>Item Group|Item|[N]Quantity|[C]Total
{REPORT ORDER DETAILS:O.ItemGroup,O.MenuItemName,O.Quantity,O.TotalPrice:(DE=HYDROS)}

Currently the report is doing

Coke 1

Coke 1

Fanta 6

Coke 2

Sprite 7

Coke 5

Coke 3

Sprite 5

Fanta 6

I want the items on the report to be

Coke 12

Sprite 13

Fanta 12

ETC not scattering it. This make me to print a very long paper.

Or If you can point me to a department report in forum I will appreciate. I have try sesrching but I didn’t really a nice one.

Add .sum to O.Quantity. O.Quantity.sum

1 Like

Here’s a report I used at one point for an install with multiple departments.

I did not write this. I found it on the forum years back when I knew even less about reports.

[Item Sales by Department:5, 2, 2,1]
@{TICKET TYPE LIST}
@{REPORT ORDER DETAILS:O.MenuItemName,O.ExactTotal.Sum.desc:(ODI=True):{0}:,}
>>$1
{REPORT ORDER DETAILS:O.MenuItemName,O.Quantity.Sum.desc,O.ExactTotal.Sum.desc:(ODI=True) and (TY=$1) and O.MenuItemName="$2"}
{REPORT ORDER DETAILS:'     '+[O.PortionName],O.Quantity.Sum.desc,O.ExactTotal.Sum.desc:(ODI=True) and (TY=$1) and O.MenuItemName="$2":2}
>Sub Total||{REPORT ORDER DETAILS:O.ExactTotal.Sum.desc.sum:(ODI=True) and (TY=$1)}
>>Total Sales||{REPORT ORDER DETAILS:O.ExactTotal.Sum.desc.sum}
1 Like

I added “.Sum.desc” to it. I now have O.Quantity.Sum.desc

Full code

[Restaurant Sales:1,2,1,1]
>Item Group|Item|[N]Quantity|[C]Total
{REPORT ORDER DETAILS:O.ItemGroup,O.MenuItemName,O.Quantity.Sum.desc,O.TotalPrice:(DE=Restaurant)}
>Sub Total||{REPORT ORDER DETAILS:O.ExactTotal.Sum.desc.sum:(ODI=True) and (TY=$1)}
>>Total Sales||{REPORT ORDER DETAILS:O.ExactTotal.Sum.desc.sum}

Thank you for this. I tried to figure where to add the DE tag, but It didnt work for me.

The First is till not summing this well. The second is perfect, but how can I add department tag or where should I put it.

Try this one

[Department Sales Details: 3,3,2,2,2]
>Manager:|{SETTING:CURRENTUSER}
Date:|{DATE}|{TIME}
@{REPORT PAYMENT DETAILS:T.Department.asc::,}
    Department:|| $1
    Discount:|||${REPORT TICKET DETAILS:CA.Discount.sum:(TS.Status=Paid) AND (DE=$1)}
    Round:|||${REPORT TICKET DETAILS:CA.Round.Sum:(TS.Status=Paid) AND (DE=$1)}
    Total Tip:|||${REPORT PAYMENT DETAILS:CA.Tip.Sum:(TS.Status=Paid) AND (DE=$1)}
>|Vat:|${REPORT TICKET DETAILS:T.Tax.Sum:(TS.Status=Paid) AND (DE=$1)}
>>|TOTAL:|${REPORT PAYMENT DETAILS:[P.Amount.Sum]-[CA.Tip.Sum]:(TS.Status=Paid) AND (DE=$1)}
    
[Payments:2, 1, 2]
>Payment|Count|Amount
@{REPORT PAYMENT DETAILS:T.Department.asc::,}
>Department:|$1
{REPORT PAYMENT DETAILS:P.Name,P.Amount.Count,P.Amount.Sum:(TS.Status=Paid) AND (DE=$1)}
>>Total Tips:|${REPORT PAYMENT DETAILS:CA.Tip.Sum:(TS.Status=Paid) AND (DE=$1)}
>>Total|${REPORT PAYMENT DETAILS:[P.Amount.Sum]-[CA.Tip.Sum]:(TS.Status=Paid) AND (DE=$1)}
    
[Paid Tickets:3,3,3,2, 3]
>Table|Amount|Tip|Payment|Time
@{REPORT PAYMENT DETAILS:T.Department.asc::,}
>Department:|$1
{REPORT PAYMENT DETAILS:[EN.Tables]+[EN.Take Aways],[T.TotalAmount]-[CA.Tip],CA.Tip,P.Type,T.Time:(TS.Status=Paid) AND (DE=$1)}

[Unpaid Tickets:3,4,2,3,3]
>>Table|Time|Qty|Price|Terminal
@{REPORT PAYMENT DETAILS:T.Department.asc::,}
>Department:|$1
{REPORT TICKET DETAILS:[EN.Tables]+[EN.Take Aways],T.Time,T.ItemCount.Sum,T.TotalAmount.Sum,T.Terminal:(TS.Status=Unpaid) && (DE=$1)}
{REPORT TICKET DETAILS:[EN.Tables]+[EN.Take Aways],T.Time,T.ItemCount.Sum,T.TotalAmount.Sum,T.Terminal:(TS.Status=Locked) && (DE=$1)}

[Sales by Product Quantity:5, 2, 2,1]
@{REPORT ORDER DETAILS:O.Department.asc:(ODI=True):,}
@{REPORT ORDER DETAILS:O.MenuItemName,O.ExactTotal.Sum.desc:(ODI=True) and (DE=$1):{0}:,}
>>$1
{REPORT ORDER DETAILS:O.MenuItemName,O.Quantity.Sum.desc,O.ExactTotal.Sum.desc:(ODI=True) and (DE=$1) and O.MenuItemName="$2"}
{REPORT ORDER DETAILS:'     '+[O.PortionName],O.Quantity.Sum.desc,O.ExactTotal.Sum.desc:(ODI=True) and (DE=$1) and O.MenuItemName="$2":2}
>>Total Items{REPORT ORDER DETAILS:MT.productType,O.Quantity.sum.desc,O.ExactTotal.Sum.desc:(ODI=True) and (DE=$1)}

[Sales by Total Group Quantity:2, 1, 1]
@{REPORT ORDER DETAILS:O.Department::{0}:,}
>>$1
{REPORT ORDER DETAILS:O.ItemGroup,O.Quantity.Sum:(ODI=True) and (DE=$1)}

[Gift Details:2,2,3,2,2,2]
>Table|Time|Item|Qty|Price|Terminal
@{REPORT ORDER DETAILS:T.Department.asc::,}
>>Department:  $1
{REPORT ORDER DETAILS:[EN.Tables]+[EN.Take Aways],O.Time,O.MenuItemName,O.Quantity,O.TotalPrice,T.Terminal:(OS.GStatus=Gift) && (DE=$1)}

[Void Details:3,4,4,2,3,3]
>>Table|Time|Item|Qty|Price|Terminal
@{REPORT ORDER DETAILS:T.Department.asc::,}
>>Department:  $1
{REPORT ORDER DETAILS:[EN.Tables]+[EN.Take Aways],O.Time,O.MenuItemName,O.Quantity,O.TotalPrice,T.Terminal:(OS.GStatus=Void) && (DE=$1)}
1 Like

@Lloyd_Tailor Is there a kb link on how to configure tips?. please I will love to have it. let me setup tips in my installations. Thanks.

1 Like