How to get food and beverages sales on custom report tag?

I am wondering what custom tags I would have to put in to get something like this. but instead of it being item grouped I want it by tills.

thank you

This can simply be done with SQL

###Template

[Sales by Terminal:1, 1]
>Terminal Name|Amount
 @@SalesByTerminal

###SQL

select TR.Name, SUM(TotalAmount) as Amount
  from Tickets
  inner join Terminals as TR on TR.Id = TerminalId
where Date > '{Start}' and Date < '{End}'
group by TR.Name
1 Like

Is there no custom tags version which can be used, its just because I dont want to make a mixture of SQL and custom report tags.

thanks

Sorry I couldn’t understand that. What is the problem with SQL?

@emre I unfortunately dont know how to us the SQL report. I am not sure what I have to change to the template which you shared. Thanks.

You’ll create a new script with correct handler.

Explained in detail here.
http://sambapos.com/wiki/doku.php?id=creating_custom_reports_with_sql

I have tried to understand how to use the SQL script however I understood how to use custom report tags a lot quicker and find it easier. I am just unsure what I will have to put to get what I want, which is to have the terminals tell me how much they earned out of food and drink.

thanks

He told you exactly what to put. Read the links to understand it.