Ive read what i can find but im struggling to get it working, this is my flow.
Ive set up a new entity type called BAR TAB with entities Tab 01, Tab 02, Tab 03 etc. I have rules and actions setup so that when orders are added to the ticket i press the open bar tab button, this brings up my entity selection screen to select Tab 01, Tab 02 etc. This adds that entity to the ticket, i also update the ticket type to Bar Tab and update AUTOPRINT state to Bar Tab so relevant receipt prints on ticket closing. After selecting Tab 01 etc a keyboard pops up so we can type the customers name and add as a ticket tag so each bar tab will also have the customers name attached to it
This issue i have is that i cant figure out how to make the entities Tab 01, Tab 02 etc change colour when they are in use (and then change the colour back when the ticket is settled and the tab is “closed”)
Once orders were added to the ticket and the open tab button pressed i wanted to be able to select Tab 01 etc and then the ticket automatically close, but the screen switch happens and doesnt log out, its something to do with the entity being added to the ticket, so i created a second button to close the “Bar Tab”
Can someone show me how to setup the colour changes on my Tab entities?
here some screen shots
Add orders to ticket and press “Open Bar Tab” button
BAR TAB: Tab 01 entity added to ticket, Status updated to Bar Tab, AUTOPRINT: Bar Tab updated, Customer Name added as a ticket tag and the Close & Update Bar Tab button appears, either add more orders or just press it to close the ticket and log out
Now the issue, as you can see i have opened a bar tab using TAB 01, so what i want now is when i open another bar tab i want TAB 01 to be a different colour so we no not to use it and to select a different entity, but currently i cant get the colour to change as below
EDIT: In fact, scrap that, ive simplified it by just having one entity called Bar Tab so every ticket gets assigned Bar Tab as the ticket entity, then a keyboard pops up to ask for customers name so each bar tab can be identified and it removes the need to have multiple entities and colour changes
BTW color changes are triggered by States. So Bar Tab Entity would need an Entity State that can change color based on availability. You added the entity but you were not giving it a state.
You are doing some amazing things with States but I would caution you to not over complicate them. I mean it might be best to not attempt to do too much with states and keep the flow simple as possible. I am not saying you did or are doing anything wrong just wanted you to think about that.
PS. It is nice to see you doing this stuff and stretching the boundaries with it. Need more people doing that and it makes Samba even better.
Thanks, i was starting to think that i was making it too complicated, then it just came to me to use the ticket tag instead and just have the one Entity and forget all the state changes and colour changes as they actually arent really needed!
You inspired me with your use of states lol so ive been experimenting lol. my Bar Tab entity has a field called Bat Tab limit so my next step is to figure out a constraint for my bar tab rule that wont allow orders to be added if the ticket total goes above that limit. You any ideas of how best to set that up?
and i just need to crack this remove staff entity action so when my auto assign logged in cashier to ticket rule kicks in, when i open a bar tab this staff entity is removed when my Bar Tab entity is added
A practice I do is I load up a stock Database and then try a simple basic version of what I am trying to do. Example is I would load up a default database then attempt to remove entities with just a basic Table Entity and work out my rules/actions until it works. Once it works then I look and derive how to integrate it with my own custom system.
Ive sorted my bar tab limit too here it is, (no need for using bar tab limit in bar tab entity, just use constraint in the rule) for this to work a constraint is added to the new order added rule to stop it updating order states on Bar tab states/tickets
Mine does that too but you do not see it because its imediately displaying the ticket again using the Update Program Setting to store Ticket ID and Display Ticket with that ticket ID that was stored.
The Program Setting and Display Ticket action was exactly for that
I will let you in on a secret. You could have typed Donkey there and it would have worked. Just dont hire any employees named Donkey or Null or you will have a conflict
Technically its a hack that its working lol. Its not that its removing it… it is adding an entity that does not exist.
BTW you could leave it blank to remove it… but it immediately wants you to add another or hit back button to leave it blank. I found a way around this by adding a bad entity to it. It may not be the best method but for now it works. @emre may design something later to make it easier.
PS. Technically you could use this method to auto assign at ticket create… and then you could park tickets that do not have Entities… and recall them via Ticket Id. It would be a clever hack or if you prefer a clever trick to bypass the default flow that you can not close tickets without payment that do not have Entities.
i have a parked sale system set up, and as i have the cashier auto assigned as an entity to the ticket when ticket it created i can park sales, but id do a entity change to remove the staff and add the customer anyway as i have it setup to print receipt with customer details on
Lol it exactly removes entity and not a hack. Might seem like a hack for staff entity case but if you use same action for coupon entities that behavior might make sense.