Is there an expression for ticket settled by user?
I see this used in the first preloaded report.
J
Is there an expression for ticket settled by user?
I see this used in the first preloaded report.
J
Look here it explains all possibilities.
I did read through the section regarding this, but I don’t see anything that refers to a settle by user. Just ticket user and order user.
I figured there would be a simple way since its on the preloaded report.
J
I think your confused on how it works. I will show you an example but you really should read through that carefully and practice it.
{REPORT TICKET DETAILS:T.TicketNumber,T.Date,T.User}
Would show tickets by ticket number, date, and user.
{REPORT TICKET DETAILS:T.TicketNumber,T.Date,T.User;(TS.Status=Paid)}
Produces the same report but only for tickets with status of Paid.
{REPORT TICKET DETAILS:T.TicketNumber,T.Date;(TU=Jesse)}
Produces tickets by Ticket Number and Date for user Jesse
I understand how the {REPORT TICKET DETAILS: Fields : Expression} work. What I’m trying to find out is if there is a field or expression that pulls the user that settled the transaction versus created.
TU shows who created the ticket not settled it. Settled is built into the Work Period Report already.
Hmm I see. It looks like that is something we do not have the option for with Tags atm. You would have to use SQL but even then I am not sure how to pull that info because Looking at the database Structure I dont see where that information is.
BTW in v4 I just tested it… that report is not showing who settled it either… it may say User Sales but its not showing User that Settled… Test it yourself create a ticket with one user then settle it with the other and check your report.
So to do this we would need to create some automation to tag it with {:CURRENTUSER}.
This can be a simple Ticket Tag or Ticket State. Ticket State would not clutter the screen with tags while Ticket Tag would show the tag on the screen.
To store it as a State here are steps:
Are you sure you created a ticket under 1 user and settled it under another. That generates the Settled by section.
The above screen shot is from a fresh install this morning.
J
I am 100% positive I just ran it again.
EDIT: NM I was looking at a different section of report… one moment.
Hmm that must have been local data. I do not see in the Database where that is available. @emre can you elaborate?
…is generated from a transaction I created today with SQL backend. Pretty sure it’s not local data. The reason why I’m looking for this is because I think with your Timecard config I can get rid of the “waiters” entity and just use reports to show whomever settled the ticket for end of day reports.
J
The workperiods report from v4 was created locally its not stored in SQL. There was some data that was local.
In v5 WorkPeriods report was converted to Custom Reports and Settled by is not part of it anymore. I am going through the database looking at all related tables and there is no data to pull Settled by from. I will keep looking though.
EDIT: I just do not see any data in the database to get Settled By from.
OK I found it… its under Payments I think there is a tag we can use. If no tag then we can certainly use SQL.
I was able to generate a basic list of payments from the customer using P.User. How do I group by that user though? Or payment types for that matter…
{REPORT PAYMENT DETAILS:P.User,P.Amount.Sum}
There is a basic syntax we can build from that. So you want it to just be totals?
EDIT: Ok it seems .Sum is v5 only Let me see what I can find for v4.
[Sales by User:1,1]
@Administrator,Jack
>User|Sales
$1|{REPORT PAYMENT TOTAL:(TU=$1)}
Produces:
hmm this pulls from wrong plasce too back to drawing board
It seems REPORT PAYMENT DETAILS is the only tag that reads those fields in the database. I am at a loss on how to get your report with v4… with v5 its simple with .Sum this syntax works in v5 as follows:
[Sales by User:1, 1]
>User|Sales
{REPORT PAYMENT DETAILS:P.User,P.Amount.Sum:(TS.Status=Paid)}
Dang .Sum would be useful. I think the P.User must pull from the AccountTransactions Table.
I need to be able to apply a expression to P.User so I can pass [:CurrentUser] to it for allow users to pull an end of shift report.
J
A simple work around… execute TC Assign User Entity on Automation Command: Settlement. Then use your Employee entity created by TC to sort the settled by. This is what I’m using
[Sales by User:1, 1]
User|Sales
{REPORT PAYMENT DETAILS:P.User,P.Amount:(TS.Status=Paid) AND (TEN.Employee={SETTING:CURRENTUSER})}
Total |{REPORT PAYMENT TOTAL:(TS.Status=Paid) AND (TEN.Employee={SETTING:CURRENTUSER})}