Why does opening a ticket set off ticket closing rules?

So i have a setup for temp bar tabs using ticket tags, when orders are added and the ticket closes a print out is produced showing order and that the ticket needs paying. So everytime the tab is opened and new orders added a new receipt prints with the current balance, this but works fine

however when i go to the entity screen, click the ticket to open it so it can be amended for some reason a ticket closing, closed and another ticket opening actions happen in the background. As this ticket closing action is being fired i get another print out but as im actually just opening the ticket it looks like it is being produced when the ticket opens

My rule debugger shows these additonal actions happening and i cant figure out why

so heres my entity screen with 1 tab

Here are the entity screen setting

Click the ticket on screen to open the order, it opens and a receipt prints (which only happens on ticket closing)

My only steps have been from the entity screen:

  1. Clicking ticket to open
  2. Ticket opening on the pos screen

However the rule debugger show more actions/rules being fired, one being the ticket closing which is generating the print out, as you can see the additonal actions/rules look like the are opening the ticket, immediately closing it and then immediately opening it again but that shouldnt be happening

You can see from the rule debugger that it is the same ticket number 28084 that is opening, closing and opening again

any ideas?? i can see any rules i have that would cause this open, close, open behaviour and from the pos screen you dont any changesm the ticket opens from the entity screen and remains open

Disable discount look to be action before closing, what’s that and in what rule?

Do you have any refresh display ticket action or save ticket actions?

That a ticket state update to do with my discount setup that when discount state is active a discount is already applied so when another discount is trying to be applied it wont allow it. On ticket opening that state is reset to allow a new discount to be applied on a new ticket

i disbaled that rule just in case and tested but had no effect

Nothing in any of the rules associated with this bar tab setup

Lets clarify because by default opening a ticket does not fire ticket closing rule. So we need to figure out what specifically in your setup is causing this.

You can try disabling rules until you find which one is causing it.

But rule debugger shows your using display ticket.

I’m using display ticket on the entity screen so when you select that ticket it opens

This all started when I added a constraint to some of my switch user roles

So what was happening was when a bar tab ticket was closed the user that created and closed that ticket when logging back In it would automatically show thatvticket on the pos. so i constrained all my switch user rules to not apply when there was a bar tab ticket state

This worked perfectly so now my bar tab tickets are excluded from the switch user setup and don’t auto load when the user logs back in

But a side effect of this has been the addition of these actions randomly firing. They are not in a rule as you can see from the rule de bugger they are just actions firing,

What I’ll try tomorrow is unmapping all the switch user rules to see what effect that has in case my bar tab constraints arent working properly

If that does work I have no idea why as those actions firing in the rule debugger are not in any rule

Ok so it needs to open the ticket to see state it then cant fire so it closes that ticket?

If you cant get it to work you can PM me a database backup I will take a look for you.,

1 Like

Finally fixed it!! i had another sneaky display ticket rule with the same auto command name, so the refresh ticket rule was firing twice

Why didnt the rule debugger pick up the rule name? it just listed the actions that were firing and not the rule that was firing, if the rule was listed as it does with others id have fixed it in seconds rather than days pulling my hair out haha

Maybe uncheck hidden box in rule debigger.