Custom reports date range not working when not ending work period?

It seems when you select a date range in custom reports, it will not only show the data for that range, but for everything within any work period that started in that range.
This means if you forget to end the work period just once, the reports will show the wrong data.

@pipo can you give an example? What range are you entering? what are you expecting to see and what it displays?

When I select “Past Month: September” from the list, does it fill the date range based on work periods somehow?

Couldn’t get it. It shouldn’t behave like that. Are you ending work periods daily?

No I’m not. I’m not in production yet, so I haven’t ended the work period for a long time.

Oh OK so this is expected behavior. In production you’ll start / end work periods daily and it will work fine.

SambaPOS does not use exact date ranges. It finds the first work period that ends after start date. This is work period 1. And it finds second work period that started before end date. This is work period 2. The date range will be start date/time for wp1 and end date/time for wp2.

If we don’t do that yesterday’s tickets you’ve created after midnight will appear in today’s report.

I understand now…
So if people forget to end a work period (and keep working with the same work period the next day, which will definitely happen from time to time, unless there is no other choice), all the reports will be wrong. Is there anyway to solve this? Maybe some way to force users to end the work period at least before they start working the next day (like after a certain time at night and before a certain time in the morning)?

How it can be possible? We have thousands of venues working in production.

I don’t understand… The report I just showed you should show everything for September, but it’s also showing data from October. This report is showing the wrong data because I didn’t end the work period, no?

OK think about this example.

You’ve started work period on 1.1.2014 11:00 AM and ended it 1.2.2014: 01:00 AM. When you want a 1.1.2014 report the range becomes…

from 1.1.2014 11:00 AM to 1.2.2014 01:00 AM.

Can we say it is wrong data because 1.1.2014 report also included tickets from 1.2.2014 ? By starting, ending work periods you also define your reporting ranges and reports obeys that.

I think we can better discuss it when you start using it on production. We have a red notification at the bottom of the screen to notify user about work period should end. Of course it is possible to make it bigger, flashy or add some sound alerts but as I’ve never heard such issues from production users I believe it works fine.

I’m sorry @emre, I didn’t mean to say the way it works is wrong. I understand that this is the only way to do it, since a workday doesn’t start/end at midnight, and you want to see data for the whole workday on reports, not from midnight to midnight.

I meant if users don’t end work periods, then some reports can show wrong data. For example if a user forgets to end the work period on the last day of the month, and the next day they just keep working in the same work period (which is just as likely because nothing stops them from using the POS), and then later I ask the data for that month, it will also include the data for the first day of the next month.

This may not be a problem for many people, but my experience in my business tells me my staff will surely forget from time to time to end the work period if they are not forced to do so.
That’s why I think it would be safer if there were some way to force users to end the work period if it’s still open after a certain time at night.
For example, if I determine the business will always be closed before 3 in the morning, then there could be a trigger at 3 AM that checks if there is still a work period open, and if there is, it restricts access to the POS (or locks the database or something) until the work period is ended.

This may be too much of a hassle to implement, I don’t know, and if it is I will accept that. But I’m hoping there can be a way to make this more fool-proof…

I don’t know… I view ending work periods the same as counting cash at end of day… etc… its something I will not accept an excuse as “I forgot”. All of my employee’s know if they EVER did something like this it would not be good. I have never once had someone forget this… its like forgetting to lock the doors… it doesn’t happen. I have not been live with samba for very long but I have been live long enough and my employees that are responsible for this know.

I can see your view on it though. Maybe we need another report system that can pull data outside Work Periods and display it with traditional calendar ranges. This would clearly need to be defined as that type of report… and probably would need to be restricted to specific data that isn’t dependent on work periods for accuracy…

I don’t know I really do not see an issue with this. If someone does forget to close work period you would know this because the report would span both work periods so data is still accurate.

Well me neither, but for some reason things are different here. My staff actually regularly forgets to count the cash at night (or at least to write it down after counting). I don’t accept that either, but my business is in a place where it’s mostly travelers looking for temporary jobs, so I have to constantly change employees already…

You are right about seeing the data range on the report though. At least it changes the range after recalculating…

@emre, I think @pipo brings some valid points. There are many restaurants that always close before midnight. An option to auto close Work Period at midnight and open a new Work Period after midnight will automate Work Period for many restaurants.

Usage:

  1. There are no managers for closing and staff is not able to close Work Period. The next day, a manager can count the money by using Work Period from last midnight. This will keep reports cleaner.
  2. WP is started without a manager starting WP each morning.

In other words, have two WP flows. WP based on Calendar Day(which closes at midnight) or multiday WP(manual start and stop).

Best Regards,

I would like to add that you can get conventional date ranges by using pure SQL and not SambaPOS for reports. Maybe if demand is high enough we could get a separate function of Custom Reports that can pull specific date ranges regardless of Work Period.

1 Like

I was going to say the same thing, and Payroll is an exact case where I use SQL because the WorkPeriod has nothing to do with hours worked.

Having an Automatic WorkPeriod End on Trigger (Midnight) would not be simple, since all Tickets must be Paid before you can close the WP.

I realize that traditionally SambaPOS uses WorkPeriods exclusively to constrain its operation in nearly all aspects, which is fine IMO. But for Reporting purposes, it may be useful to gather data that is outside those ranges, and right now SQL is the only way to accomplish this…

Something to think about regarding Reports for sure… perhaps have a check-box up near the date filter on the right-top allowing override of WorkPeriod dates so that the Report obeys the dates supplied.

1 Like

maybe add also that we can end period even we have pending transaction… because some of our costumers transaction advance order and we need to give a receipt… and the WP can’t give the specific date that we set up…

Use pre-order tickets for that. I think you can find more info by searching forum.

1 Like