Printer Template based on Time

Wondering if it’s possible to have two separate printer templates for the same print job that trigger based on the time of day.

Use case:
We have a business that outwardly operates as two separate restaurants depending on the time of day. In the morning and lunch it runs as a relaxed café, and in the evening it becomes a higher-end restaurant with a different menu and vibe.

Internally, however, it is still a single cost centre with the same staff and stock. We operate two menus (with a small amount of overlap where needed) and track reporting using different work periods and staff logins. All of that is working well.

The only outstanding area is the customer bill. At the moment it only prints one version of the bill.

Does anyone have ideas on how to have two separate bill formats available? One thought was to use a second button, but I also wondered if it’s possible to automatically change the printer template at a set time of day.

I assume there are probably a few creative ways to solve this in SambaPOS, so any suggestions would be appreciated.

There are at least two ways to do this.

First, you could have two rules that respond to the automation command you’re using to execute the print jobs and using constraints on the time (I’m just picking 1500 as an example swap time).

{DATE:HHmm} < 1500 then print Café receipt
{DATE:HHmm} > 1459 then print Restaurant receipt

it would look a bit like this:


You could also have one rule handle both by adding constraints to the actions themselves like this:

[=TN('{DATE:HHmm}')] < 1500 then print Café receipt
[=TN('{DATE:HHmm}')] > 1459 then print Restaurant receipt

2 Likes

amazing! thank you for this, I hadn’t considered the second method at all! i’ll let you know how this goes!