Close Open Ticket

I have constrained the default “Mark Ticket as Closed” action in the “Ticket Payment Check” Rule.

Basically I want the any tickets with a table entity selected to remain open so the order can be checked and another ticket could not be added by mistake.

I have then created a automation command to Close the table executing the previously skipped “Mark Ticket as Closed” Action but the ticked remains open.

When ticket is open I can change the Entity (a different table) after I press “Close Table” The ticket behaves as if is closed (can no longer switch entities) but as soon as i hit close the ticket reopens again

Any ideas why it cant be marked as closed?

Mark Ticket as Closed is only allowed on the before Ticket Closing event. You should instead create a specific state and check for that state to allow the rule in addition to the Remaining Amount equals 0. For example it could be a state called Allow Close and value can be True or False. Use the automation command to set state to True and close ticket. Use Entity Changed event to set the state initially.


Or extending/combining kendash solution you could add the allow close state as a seccond constraint on the mark ticket as closed action there like this
‘{ENTITY NAME:Tables}’ == ‘’ || ‘{TICKET STATE:AllowClose}’ == ‘True’
The double pipe is OR in constraints.
Your close automation command would then set the allow close state to true and regular close ticket action which then passes over to this rule.
You might want to consider/look at adding a paid entity state and defining it with state formatting so you can also have a paid colour/format on your entity screen to go with new orders and Bill requested.

1 Like

Thanks Kendash I don’t think I would have ever figured that out.
JTRTech Good Call on the Paid state, the entity was just going grey when It was marked as paid which is OK but I could apply more informative captions with the state applied.