Table transfer between waiters

That worked great what does “ticket id = 0” mean?

Its displaying the current ticket.

If you put 1 it would display ticket 1

In order to complete the use of the “waiters” entity for me, I need to get a custom report working which will do an “end of shift” report based upon the “waiter” entity for people to count out.

I’m just starting to dive into the module (got it yesterday). Has anyone completed a report like this yet. Basically…

Select Payment Totals from Tickets Where Waiter Entity = Current User and Date* = *Current Work Period

?

Take a look here it shows all the possible tags for custom reports.

http://sambapos.com/wiki/doku.php?id=custom_reporting_tags

And this is the main Custom Reporting Wiki

http://sambapos.com/wiki/doku.php?id=custom_reporting

I think I got it figured out. Any way to access the current user within custom reports? What would that syntax be?

I’m thinking this should work.

Total: {Report Ticket Total:(EC.Waiters.Water = {:CurrentUser})}

?

Joe

Try this:

{REPORT TICKET TOTAL:(TEN.Waiters={:CURRENTUSER})}

PS Case sensitive… if its caps it has to be caps.

However there is one flaw with that syntax… what if current user is admin just to view reports?

If your tying users with Entities then it wont matter in the reports… you just need to look at sales per entity. Or Sales per User. What would be the purpose of linking the two in the report?

I would write a different report for the admin. This report is only for waiters at the end of their shift. Since tables are often transferred to a different waiter and then cashed out by that waiter I need to show totals at the end of the shift for that waiter based upon the waiter entity.

The idea of using CURRENTUSER is that only that waiter should be able to see their totals. I don’t think there is anything to gain from showing all waiter totals.

A follow up question, can you restrict certain reports for certain users? Ideally I want specific user or user groups to only be able to access end of shift reports and admins to be able to access everything.

If you use an Entity Screen and Report Widget yes you can restrict it. You simply map that entity screen to the user.

I’ve never created a customer entity or used the report widget. After reviewing what they do, I don’t think that’s what I’m going for. I simply want the waiter to be able to print out their report on a thermal printer with their sales at the end of their shift.

Ok so how do you want them to do this? You could create a button that prints a report named {:CURRENTUSER}. You make separate reports for each user.

That’s a great idea. I was going to have them go into the reports section, but your way makes it easier to restrict.

So if I create the report and the button, only question is how to call that report.

I don’t have SambaPOS in front of me right now (Had to format test computer) but I think there is Print Report action…You would use a variable for Report name like [:Report Name] and then in the rule you put {:CURRENTUSER} for Report Name.

Thanks Kendash. I’ll mess with it later and see what I can find.

Also try using {SETTING:CURRENTUSER} tag if {:CURRENTUSER} does not work. It is a better idea to use expanded version inside templates as {:CURRENTUSER} version implemented to give direct access to settings inside rules.

Also if you want to use pure SQL you can use {UserName} and {UserId} tags inside SQL scripts. You can also use {Start} and {End} tags for reporting rages.

2 Likes

Thank you @emre I just tested it and you are right {SETTING:CURRENTUSER} works in reports but {:CURRENTUSER} only works in rules.

So you could try this report syntax @josephrussell:

{REPORT TICKET TOTAL:(TEN.Waiters={SETTING:CURRENTUSER})}

So this would work great for you:

In this case {:CURRENTUSER} would work because thats being used in the rule.

EDIT: Actually you wouldn’t even need to do that its much simpler… you could just make one report and call it from the Print Report action since the report itself is reading {SETTING:CURRENTUSER}

2 Likes

Got this working, it was pretty easy too. The only thing I’m not loving is what screens the button is on. Any idea on how to locate the automation button on the NAV screen, somewhere at the bottom. Or maybe another place you would recommend? This way they don’t have to go back into a ticket to print their end of shift report.

Thanks,
Joe

You cannot add automation command to the blue nav screen in v4.

I thought I saw someone adding automation to the bottom of the nav where it says the department names.

Joe

Hmmmm, havn’t seen that one. Possible it might have been a screen shot from V5beta, there are lots new features of which many relate to the nav screen so that might be where you saw that.

Nope. Not possible. Not even in V5.

Automation commands in V4 can be located in the following places:

They can also be placed on Entity Screens and Account Screens.


In V5, the entire Main Menu (NAV) is made up of Automation Commands, but you still cannot alter the bottom row of the screen where you see Keyboard, Department Names, Main Menu.

3 Likes