Add Settled by Terminal to Work Period Report

I’ve added terminal Id to tickets, orders and payments. It will be available for next (4.1.49) update.

2 Likes

Thanks you. I look forward.

@emre,

I will use Custom SQL module to query for Payments made on each terminal. I checked Payments table using MS SQL Server Management Studio, but TerminalID is showing a number. I thought it should show Terminal Name, so I can query payments make to that Terminal.

Can you assist with writing an SQL query to pull payments made on each terminal? It should be helpful for anyone how is facing this issue. I am sure SambaPOS is used with multiple tills.

or

Can you include the above request on Work Period Report.

Best Regards

Use a subquery to pull the Terminal Name…

use [SambaPOS4]
SELECT [Id]
      ,[TicketId]
      ,[PaymentTypeId]
      ,[Name]
      ,[Date]
      ,[AccountTransactionId]
      ,[Amount]
      ,[AccountTransaction_Id]
      ,[AccountTransaction_AccountTransactionDocumentId]
      ,[UserId]
      ,[TenderedAmount]
      ,[DepartmentId]
      ,[TerminalId]
      , (select [Name] from [Terminals] where [Id]=[TerminalId]) as TerminalName
  FROM [Payments]

The subquery is the last line:

(select [Name] from [Terminals] where [Id]=[TerminalId]) as TerminalName

@QMcKay

Thank you so much for offering help with my SQL queries.

I just pick up some books on SQL and started learning, hopefully one day can pay back the community.
Here is what I am trying to accomplish. Total all Payment Types made on each Terminal.

Sample Report

Terminal Name: REGISTER

Payment Type: Total:

Cash Total Cash tendered on REGISTER
Credit Card Total Credit Card tendered on REGISTER
Gift Card Total Gift Card tendered on REGISTER

Terminal Name: BAR

Payment Type: Total:
Cash Total Cash tendered on BAR
Credit Card Total Credit Card tendered on BAR
Gift Card Total Gift Card tendered on BAR

*Skip Payment Type with Zero balance

@QMcKay or anyone good with SQL queries,

Can you please help with above query. I will be eternally thankful. :smile:

You can learn a lot through microsoft management studio. It has a query builder tool and while its not exactly the same… it would give you a good understanding of the structure… then you can pickup basics by looking through scripts already posted on these forums.