Help with reservation/Preorder workflow

silentbob report tags are useful to create reports without dealing with SQL but you are not limited to report tags. Instead of trying to match it to what reporting tag offers you can use SQL to prepare your reports as exactly you want. I’ve prepared an example about how to filter payments by payment date instead of ticket date.

Create a new script. You can access that script inside reports via @@Payments handler.

This is the SQL Script.

Select Payments.Name as PaymentName, 
   Payments.Date as PaymentDate, 
   Tickets.Date as TicketDate, 
   Tickets.TicketNumber as TicketNumer, 
   PaymentTypes.Name as PaymentTypeName,
   Amount,
   TenderedAmount,
   Users.Name as UserName from Payments
inner join Tickets on Payments.TicketId = Tickets.Id
inner join PaymentTypes on Payments.PaymentTypeId = PaymentTypes.Id
inner join Users on Payments.UserId = Users.Id
where Payments.Date > '{Start}' and Payments.Date < '{End}'  

Create a new report as follows or you can include it as a report section in WPR.

This is report template.

[Payments:1,1,1,1,1,1,1,1]
>Payment|Date|Ticket Date|Ticket Number|Type|Amount|Tendered Amount|User Name
@@Payments

What I’ve tried to explain to you is how you want SambaPOS to operate may lead to issues. If you know exactly what you need you can implement your own way.

2 Likes