Custom Reports From one hour to another during current work period

Hello, I’m tryng to set up Sambapos to use it in a hotel, I have set it up so that tickets are not closed until I press a button like in the follow tutorial: Changing Ticket Closing (Locking) Workflow, so now tickets stay open even when full payment has been done and I can also end work period and star work period again to find the ticket with all the orders on it, which simulates a guest arriving to the hotel, paying for the night and staying in a room until he check out. I’m also able to add any extra charges during the guest stay since the tickets will be open, and finally on check out i just press the close button that will print the bill and make the room available for a new guest. I just realized that this setup is not very friendly for sambapos reports because if I end work period while one room ticket is still open, it will send this ticket amounts as pre orders, and if then I start work period again and paid for this tickets this payment transactions won’t be shown in the current work period. So here is my question, is there any way with custom reports to show only tickets that have had some payment done during the work period? For example, now if a room ticket is open and has not been pay and then I end the work period and start it again, when I pay for this room ticket in the next work period this transaction is not showing in reports, so is there any expression to call for this values in custom reports since this is happening in the current work period?
Another approach will be to avoid end work period and keep it open all the time, if so, is there any way to call the transactions that happen from one specific hour to another? Something like this:
Detailed Server Report-->All server transactions for current Work Period and Current logged user
But to be able to input the hours we want the report transactions to be show. For example, Since I will not be ending the work period, I would like to generate a report by choosing the initial time until the end time of the shift, let’s say a report for transactions done from 9:00 until 13:00, is it possible? If so, can anyone show me how?
If anyone has gone truth some similar sambapos configuration and can give me a solution to this problem it will be really appreciated, thanks in advance!

When you convert pre-order to a real ticket and make payment for the ticket, this ticket (and all related payments / calculations, etc…) will appear in the work period ticket get paid. If you didn’t do so please ensure latest (5.1.56) version is installed.

1 Like

Thanks for your answer, I have latest version of Sambapos installed. Now that I had read some more post about pre orders and I have a better knowledge of it, the problem I’m encountering with pre order tickets now is as follow:

All my tickets are created as pre orders, I had set up rooms as tables in the original system so a customer check in, I assign him to a room (table) and he pays for the first night (Ticket will stay open with 0 balance and just be closed after i press the close ticket button i set up which will be press on check out to print the ticket invoice as well), then he gets something for dinner but will pay it on check out, if then the work period is ended the work period report will show the correct transactions that where charge on that day (In this case it will show the payment for the room correctly and the lunch that was not pay will be in the pre orders section)

Next day I start work period I set this ticket to a real ticket by setting pre order to false and change ticket date to true with the change ticket property action, if then the customer decide to check out, he will just pay for lunch (that was the only thing left to pay on the ticket) and then I will press the close ticket button which would close the ticket and print invoice. Now if I end work period the work period report will show me as if the client pay the room and for the lunch on that day, even when he just pay for the lunch.

Is there any way that the report will only show the transaction that were pay that day (lunch payment in this case) and not the amount that was already charge the previous day (room payment).
The problem with this is that on the end of the shift the employee needs to know how much he charge on his shift(cash, credit or deposit) and as of now it will show the wrong amount not just what was charged on his shift.

Any way to fix this or another aproach I could take to this problem? It will be really appreciated, thanks!

@Andresb8 your in the exact position I was.
My recommendation… save yourself a HUGE lot of headaches and use Accounts.
If you use accounts all you need to do is make a few adjustments to the report to show a balance BF and CF and other little bits and you will be able to reconcile sales and cash correctly.
This coupled with the new {REPORT SQL… tag and QMcKays statement tutorial you would print a statement as the guests checkout bill.
Happy to assist if you choose to use accounts.

Also, use the return key, thats really painfull to read in block paragraph :stuck_out_tongue:

This is the key part messing things up im pretty sure anyway, changing the date is going to mess up reports.
In theory if you went back a reprinted the previous reports and adjusted your reconciliation it would balance in the long run but still would be messy.
The issue is you have altered past report by ‘moving’ the ticket from old period to new.
Using accounts leaves tickets and payments in the right work period and keeps a running balance etc within the account.

Yes, I been trying too hard to find a solution for this so I’m more than willing to start it again if this will solve my problem, is there any way you could send me a copy of the database backup where you used accounts and all the other things to solve it so I can load it into my computer and analyze it to see how to implement this in my case, thanks a lot for your help!!

I will use the return key in my next posts, I’m new here sorry :smiley:

We don’t share DB anymore, believe it messes up licences but happy to offer suggestions/help.

If your using full sql just change connection string to a diferent DB name and samba will populate it with a fresh install and keep you existing setup if your not happy by changing database name in string back.

First off you need to decide on an accounting method.
QMcKays Statement tutorial makes it possible to only print transactions from certain date (ie checkin date).
As this wasn’t available when I did the last setup like this I opted to use dual entities, room and booking, on checkin a new booking entity (and in turn account) were created to separate each bookings transactions.
QMcKays method would be cleaner but have not used myself yet.

Too bad DB can’t be shared :(, it will make it a lot of faster to implement but anyways I will go ahead and read more about accounting methods, can you provide a link to QMcKays Statement tutorial to get started please?

The statement tutorial is;

1 Like

Some bits for a head start.
This was my room balance/summary report;
Although it was based on the dual entities system

[Room Account Statement:1,2, 1]
@{REPORT ENTITY DETAILS:EC.Booking Number:(EN=$1)}
$1|$2 | {CALL:accountinfo.accountbalance('$2')}
>Total|{ACCOUNT TOTAL:Booking Accounts}

And I used this under payments report to correctly reconcile ticket payments and account payments as the payments report tag only looks at tickets, not account payments;

[Banking Details:2, 1]
Rooms Cash|{ACCOUNT TRANSACTION TOTAL:Booking Cash Payment:Cash}
>>Total Cash|[=F({REPORT PAYMENT TOTAL:(PT=Cash)}+{ACCOUNT TRANSACTION TOTAL:Booking Cash Payment:Cash})]
Till Card|{REPORT PAYMENT TOTAL:(PT=Credit Card)}
Rooms Card|{ACCOUNT TRANSACTION TOTAL:Booking Credit Card Payment:Credit Card}
>>Total Card|[=F({REPORT PAYMENT TOTAL:(PT=Credit Card)}+{ACCOUNT TRANSACTION TOTAL:Booking Credit Card Payment:Credit Card})]

What these will give you is a way to account for the difference between sales total and revenue total.
If sales are more than revenue you will see a higher balance for rooms than before and visa vera.

Somewhere I have code for balance BF and CF, for that I used a script call and an SQL query.

Before I get into this, I would like to know if after setting this system up I will be able to:

When a customer arrives, check him into a room.

The room will be unavailable until he check out.

I can add purchases to this customer room account and payments done in advance from the customer.

After the customer check out the room it will change state to know it needs to be clean.

I can set an state to the room even it it has not customer assigned, like maintenance for example.

Can this be accomplished in some way?if so it would be great and I can get started with this.

Are you intending to try and use for reservations to just a ‘current’ bookings system?

If your only looking to log current bookings/room states this could all be achieved through automation and entity states.
I personally wouldn’t look to use samba for future reservations, if thats what you need I would recommend a 3rd party booking system as feature wise you would be much better off with things like online booking and channel management and look to configure an integration like I am doing with NewBook PMS.

Yes I’m just gonna use Sambapos for people that are arriving to the hotel to check them in and out, I don’t need it for reservations, I already have another system for that, so will it be possible to accomplish the things described before?

Yep, accounts will make the accounts/reporting allot cleaner and easier and your other things could be achieved with entity states.

Thanks a lot for he information! I will get my hands on it then!

We also have state logging that could be used for entities.

Example is a room entity could change to booked then when checkout happens it changes to vacant and the logs could be used to determine length of stay. Transactions could have that entity assigned to them. All of this can be reported with custom reports.

You could report on all transactions with that entity with constraint for booked entity state.

Another benefit is it can track how long rooms stay vacant.


Sounds like a nice features, any tutorial link you can provide for this?

Not exactly for what your doing however the time clock tutorials in version 4 forum demonstrate how to use state logging. Version 5 has improved automation so everything you asked about could be done. There may not be much tutorial help but if you start experimenting we can help you along the way.

1 Like