Sales report per user


The customer asks to make a report, which will show which user has sold products for how many. For example, User Mark sold 10 burgers, 5 drinks, 1 American coffee.


So using the existing report look how users are reported on wp report with an @{report xxx} type line.
This gives you a list of users you can feed into another report.
Then take the item sales report and using the users list from above as a user constraint to the report line so it also reports based on order user.
You may want to add a $ number as a header to show the user name.


Hm, whats a problem?

[Продажи по официантам:1, 1]
@{REPORT PAYMENT DETAILS:P.User,P.Amount.Sum::{0}:,}

[Settled by $1:1, 1, 1]
{REPORT ORDER DETAILS:O.ItemGroup,O.ExactTotal.Percent,O.ExactTotal.Sum:(ODI=True,PU=$1)}
Total||{REPORT ORDER DETAILS:ExactTotal.Sum:(ODI=True,PU=$1)}


This should be (ODI=True) and (PU=$1)


This did not fix my problem.


Show us your report syntax now.

[Продажи по официантам:1, 1] 
@{REPORT PAYMENT DETAILS:P.User,P.Amount.Sum::{0}:,} 

[Settled by $1:1, 1, 1] 
Total||{REPORT ORDER DETAILS:ExactTotal.Sum:(ODI=True)(PU=$1)}


Missing the AND between (ODI=True)(PU=$1) it should be (ODI=True) AND (PU=$1) which is what Emre said and you didn’t follow


It’s my wrong, I fixed it, but it still doesn’t work. And I tried using this solution: Item sales report by user but is the same.


Showing your result and explaining what’s unexpected would be helpful.


First option:

[Settled by $1:1, 1, 1]
Total||{REPORT ORDER DETAILS:ExactTotal.Sum:(ODI=True) AND (PU=$1)}

First result:

Second option:

[Settled by $1:1, 1, 1]
{REPORT ORDER DETAILS:O.ItemGroup,O.ExactTotal.Percent,O.ExactTotal.Sum:(ODI=True) AND (PU=$1)}
Total||{REPORT ORDER DETAILS:ExactTotal.Sum:(ODI=True) AND (PU=$1)}

Second result:

Thrid option:

[Sales by User:5, 2, 2,1]
@{REPORT ORDER DETAILS:O.MenuItemName,O.ExactTotal.Sum.desc:(ODI=True) and (OU=$1):{0}:,}
>{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}

Thrid result:

All options had the same problem.
I think if I made 2 menu - is can be the problem?


Where to begin.
I presume on the first two there is a @ defined above the title that your not showing?


Next is the use of PU on order report. This won’t work, payments and orders have no direct link so payment user is not available to an order report. Why not just report payments by user?


Because my client wants the report to be “item sales per user”, not only payments. And I had a problem with this syntax because I didn’t find instructions about reports programming in sambapos. I don’t understand, how it works and trying to use examples.


You can find all report syntax and very good instructions at


Try out this report template. If it works, we can customize it for your needs

[Зарплата 10% от проданного:1, 1]
{REPORT ORDER DETAILS:O.User,=[O.ExactTotal.sum]/10}

[Продажи. Итоговая сумма $1:1, 1, 1]
{REPORT ORDER DETAILS:T.TicketNumber.,T.Time,O.ExactTotal.Sum.desc:(ODI=True) and (TU=$1)}
>Итого|{REPORT ORDER DETAILS:O.ExactTotal.sum:(TU=$1)}
>Итого 10%|{REPORT ORDER DETAILS:=[O.ExactTotal.sum]/10:(TU=$1)}

[Продажи блюд $1:1, 1, 1]
{REPORT ORDER DETAILS:O.MenuItemName,O.Quantity.Sum.desc,O.ExactTotal.Sum.desc:(ODI=True) and (TU=$1)}


It’s really works, thank you!