I am terrible at knowing what to use for constraints.
I barely understand it.
We have the system set up so that when a ticket is entered or closed it auto logs out and back to the sign in screen.
This also works on print bill.
We like it, however now that I am using split ticket feature, when you are at the split ticket screen you can print each ticket. This is nice, however the way I have it setup, you will print and get logged out.
Is there a constraint I can add here so that it doesnt log anyone out, while they are printing from the split ticket screens?
Off the top of my head, you could set a local variable (e.g. “splitting = true”) when splitting a ticket then clear that variable when a ticket is closed. Then you could constrain the close ticket action to only execute when splitting == true;
I was hoping that someone knew of a constraint to add to the constraint portion of this Print Bill/Close Ticket rule in the screenshot above to basically always log out unless on the split ticket screen.
You have to flag something somewhere so the automation knows what’s going on.
I think this should work. I can’t test as I’m still on an older version.
Create this action:
Setting Name: [:Name]
Setting Value: [:Value]
Update Type: Update
Is Local: True
In whatever rule is fired for split ticket, add this action container:
Name: isSplitting
Value: true
Create a rule that executes on the Ticket Closed event and add the Update Local Setting action you created and set the name the same as above, with the value = false:
Then in your print bill rule for the Close Ticket action container constraint, add '{LOCAL SETTING:isSplitting}' == 'true'
I cloned the Print Bill automation command, named it Print Bill Split Tickets.
Removed the Button Header name.
Changed the mapping to Ticket List so that I wouldn’t have a duplicate button in other places.
I cloned the Print Bill rule to Print Bill Split Ticket rule.
Removed the Close ticker action from that rule.
Changed the custom constraint to Print Bill Split Ticket.
Finally I changed the settings of Split Ticket to use the Print Bill Split Ticket command and it works great so far in testing.