sorry for making this topic again but i need help to create 2 custom report (i can’t understand tags report ) :
1- to show food , beverage and dessert separate totals in 1 report
2- item sales report for food only and another for beverage and another for dessert
how i can create report for account or entity to show all orders that ordered on this entity or this account ??
other thing i have something here called officer that mean store manger and ass. store manger can get food and beverage but don’t count as sales, it’s more like a gift but we call it here officer and we settle table to officer at end of it .
is there is anyway to do that ???
That is a very good resource it explains tags in detail and has samples. You can also look at built in default reports to get good idea of how most tags work.
Try to explain your need in more detail and try to visualize it as much as you can. Trying to explain reports with plain text might be confusing as some terms might have different meanings depending on how you use them. For example by saying food, beverage, dessert do you mean to group sales by product group or do you mean courses?
See this post as an example of how descriptions can be confusing and how samples solves it.
and as you see in pic i created entity called mohamed with store manger name .
i also created payment type officer to close all officer tables to account called officer
@a.samy Thank you very much for your detailed explanation. This comment is important because there is more than one way to implement things in SambaPOS. Are you using product groups to define if a product is food or beverage?
comp is more like gift but go under sales total and gift don’t
C/L is pay way but for stuff member not customer and it cut from his salary at end of the month
OK. Don’t do that. I’ll keep it simple and prepare a sample that Product Tag. After that you can use custom tags if you want.
First of all define it by using Custom Product Tags. Tag is used for printing purposes. Custom Tags better used for reporting. You can use Product Tag Editor to update tags.
[Orders by Officer:2, 1, 1]
>Item|Quantity|Total
@Mohammed,Ali,Other Officer
>>Orders by $1
{REPORT ORDER DETAILS:O.MenuItemName,O.Quantity.Sum,O.ExactTotal.Sum:(TEN.Officer=$1)}
>$1 Total|{REPORT ORDER DETAILS:O.ExactTotal.Sum:(TEN.Officer=$1)}
Type names of officers you want to include in report on the line that starts with @ character.
@a.samy I hope these samples will help you a bit to understand how custom reports work. I strongly suggest you to study these, review documents and prepare your reports. Feel free to ask anything you don’t understand. Once you get it you can prepare any report you want and update them as your business needs changes.
I would like to share a modified Orders by Officer report its optional but improves it. This report will work even for new Officer entities added without the need to edit report.
Report:
[Orders by Officer:2, 1, 1]
>Item|Quantity|Total
@{CALL:officers.getofficers()}
>>Orders by $1
{REPORT ORDER DETAILS:O.MenuItemName,O.Quantity.Sum,O.ExactTotal.Sum:(TEN.Officer=$1)}
>$1 Total|{REPORT ORDER DETAILS:O.ExactTotal.Sum:(TEN.Officer=$1)}
Script:
function getofficers(){
var qry = "SELECT e.[Name] FROM [Entities] e JOIN [EntityTypes] et on et.[Id]=e.[EntityTypeId] WHERE et.[Name] = 'Officer' ORDER BY e.[Name]";
var r = sql.Query(qry).Join(',');
return r;
}
Wow good to know. I am trying to figure out what its doing. But thats a different conversation.
So a simpler version of what I just showed would be ignore the script completely and use this report.
[Orders by Officer:2, 1, 1]
>Item|Quantity|Total
@{REPORT ORDER DETAILS:EN.Officer,O.Quantity.Sum::{0}:,}
>>Orders by $1
{REPORT ORDER DETAILS:O.MenuItemName,O.Quantity.Sum,O.ExactTotal.Sum:(TEN.Officer=$1)}
>$1 Total|{REPORT ORDER DETAILS:O.ExactTotal.Sum:(TEN.Officer=$1)}