Not working in V5 - Occupied Entity

It’s not hard, you just need to be careful not to mess up default state flow.
You either need to just visually mark entity with custom state or interupt the default rule for marking a ticket as closed with 0 value.
If you want just visual on entity screen create a button and rule to update entity status state to say occupied.
This would then be overridden when you start a ticket to default unpaid.
Alternatively you start a ticket and the button say adds a ticket tag. Then you adjust the default rule that closes ticket when remaining = 0 to add constraint that checks ticket tag isn’t occupied or whatever chosen.
You would then need a way to force close once paid. Either another button to manually close or automation following payment depending on your flow.

So what is the default out of the box flow for the states of creating tickets so i can know where i need to interrupt this flow.

So this is why its not working…

Tickets so between Status=‘New Orders’ when order added and then Status=‘Unpaid’ when closed (not paid) and are submitted to database. This repeats each time new orders are added.
By default orders are Status=‘New’ when added then Status=‘Submitted’ when saved to DB/ticket closed
By default if ticket remaining balance = 0 when ticket is closed it is ‘locked’ marked ‘IsClosed’ = True and status changed to Status=‘Paid’
Entities have their own status state.
When ticket entity is changed (entity selected) entity Status=‘New Orders’ [Orange by default]
If you print bill the ticket is locked and entity changed to Status=‘Bill Requested’ [Red by default]
When entity is updated there is a rule to check for open tickets and if 0 Status=‘Available’

what constraint should i add to say if the state is not occupied and open ticket count is 0 then change it to avalible again

On the hotel system I have a basic reserve serupt which uses a dummy 0 value product which is specified in print template not to print.
A reserve button adds that product and sets a custom ticket state of KeepOpen=‘True’
In my ticket payment check rule i added ‘{TICKET STATE:KeepOpen}’ not equals ‘True’ to stop ticket being closed automatically.
I then have an order added rule which checks if ticket total is >0 to remove that ticket state (since it now has a value you dont need to force it to be kept open allowing it to be closed once it is paid.
The bug in this is to remove the reserved ticket without it actually bing used you have to add a random order (to clear the state) then cancel it.
As mine is for reserved rather than occupied i did also include a custom entity status of reserved into the flow but for your senario you wouldn’t need this.

This seems to have worked out for me…

Not sure that will work live… test with multiple tables.
You have no relevance to table so would say you will find it will get messed up with multiple tables…
Program setting would be updated regardless of table which will cause issues.
You either meet to pre/suffix setting name with table name/number or use something ticket specific.

Hmm… Was just looking at this and i was playing with the table reservation module… it kind of does what alot of us want… reserves a table… could this be modified to reserve a table based on the waiter/waitress that is assigned to it?

Dont know your flow so hard to say and hant spent much time on the reservations setup.