Item sales report by user

Hi

I have 2 terminals in my business (user 1 and user 2)

I would like to know how much of each item each user sells, so I have modified the “User Sales” entry from the standard work period report from:

[User Sales:1, 1]
[REPORT ORDER DETAILS:O.User,O.ExactTotal.Sum]

To:

User Sales:1, 1]
[REPORT ORDER DETAILS:O.User,O.ItemGroup,O.ExactTotal.Sum]

That gives me a report I can use, but it comes out like this:

User Sales
User 1 Pizza 100
User 1 Beer. 50
User 1 Tapas 150
User 2 Pizza 200
User 2 Beer. 350
User 2 Tapas 100

As I said I can use this, but I would prefer that the users were separated in the report so it comes out like this:

User 1 Sales
Pizza 100
Beer. 50
Tapas 150

User 2 Sales
Pizza 200
Beer. 350
Tapas 100

Is this possible?

1 Like

You would take the list of users on an @ line (copy the one from the work period report and then under use $1 to insert the loop user name:
@{user list copied from wp report}

$1 Item Sales (title for username)
{report order details:field1,field2:(constraint on order user =$1)}
That’s obviously not correct as on phone so can’t check correct expressions but gives you the idea.

This report will work by next update (5.1.61).

[Sales by User:5, 2, 2,1]
@{REPORT ORDER DETAILS:O.User.asc:(ODI=True):,}
@{REPORT ORDER DETAILS:O.MenuItemName,O.ExactTotal.Sum.desc:(ODI=True) and (OU=$1):{0}:,}
>>$1
>{REPORT ORDER DETAILS:O.MenuItemName,O.Quantity.Sum.desc,O.ExactTotal.Sum.desc:(ODI=True) and (OU=$1) and O.MenuItemName="$2"}
{REPORT ORDER DETAILS:'     '+[O.PortionName],O.Quantity.Sum.desc,O.ExactTotal.Sum.desc:(ODI=True) and (OU=$1) and O.MenuItemName="$2":2}

2 Likes

Thank you for the suggestion.

Can you point me to a thread with information on using constraints?

I have tried searching, but not found any topics.

Sounds great.

When will the next update be available?

I want to view this report by TerminalId. I have 5 terminals connected to the same database so I want to view this report by Terminal.

Terminal 1, (Item Sales Report)
Terminal 2, (Item Sales Report)
Terminal 3, (Item Sales Report)
Terminal 4, (Item Sales Report)
Terminal 5, (Item Sales Report)

Latest version is 5.2.3 so that report will already work.

This now works in v5.2.14 otherwise in v5.2.12 it had a high cpu usage and was breaking the report. I just tried on the new release and it works fine. Thanks for this.

2 Likes

I tried to use this in my terminal but did not work. What’s wrong? I just copy-paste code by @emre into the program, maybe I need change some parameters?

What version of Sambapos are you on?

Stable 5212 version (I need more symbols for my reply)

I just copy pasted it and it worked.

Nope.
empty2

Yes it works just fine.

But not in my DB. Can you help me with search mistakes?

All I did was copy and paste Emre’s report.

You do have sales data for it to report on right? Show screenshot of the same screen I did so I can see how you configured it.

Latest release version is 5.2.14 you should install that. 5.2.12 is older In fact in this very thread just above where you asked your question someone mentioned that it worked fine in 5.2.14 but in 5.2.12 it didnt. Did you not see that?

Any update on this?
Thanks

Can this be modified to report on sales by Terminal? Which parameters need to change?
Thanks