Make table available if is not set as occupied and Menu in V5

In first place, I would like to thank all the people involved in the Sambapos project, I’m getting to know it better and I like it so far. I just bought the V5 license but I upgrade from V4. I have a special setup to Sambapos, I use this tutorial Changing Ticket Closing (Locking) Workflow to keep the tickets open and be able to end work period. Then I created a button to change entity state to occupied with this tutorail Button to change entity state . When I set the table to occupied it will change color to occupied and close the ticket but later if i open the ticket and press the close ticket button it will change the ticket again to available, which I only would like to be done after I press a button to make it available. I happen to get around this by modifying the Update Available Entity Color rule and setting a new rule to make table available after void. The only problem now (which was cause by playing around with all this rules) is that when I change an order from one table to another, the first table is not becoming available even when it has no orders and it status is new, so this table is keeping the color of the last state (Unpaid/Paid in my case), to fix this now I would like a rule (Make ticket available after change table) that change table color to available only when entity state was not set to occupied before but i can’t not get it to work, any help will be really appreciated.

Another question I have is that before in Sambapos V4 when I have a sub menu I used to click on the category to get into it, now after I upgrade to V5 the items in the submenu are open and located under the category, It is possible to have it like before so that the menu item are shown only after pressing the sub menu button in a different screen?

The blue items are shown under the category (yellow) I would like to have the blue items show only after pressing the yellow button in a new screen with a comeback button like in V4 if its posible, Thanks for your help in advance!

The submenu will default to the first submenu group so they are treated more like tabs within a category, this was a suggestion I put forward as by putting the most comonly used sub menu group at the top of the category (I think its sort order based rather than alphabeticly for submenu buttons) it reduces the need to click into the submenu every time you go into it,
You will also notice that submenu buttons are now also static at the to and you dont need to go ‘back’ out of a sub menu which was another big efficiency boost/click reduction.
I dont know if there is an option to revert however if you put a dummy product (might even work with a custom button with no formatting) into the category and do not set a submenu group in the category settings it will show the non submenu grouped ‘products/custom button possibly’ and then mean you use the submenu buttons more like the old system which your referring to

As for your other question what is {:Ocuppied} ment to be? I dont think thats a valid tag!!!
This is a state right? Think you want something like {ENTITY STATE:Ocuppied} Not Equals True

Ok, makes more sense what your asking, personally what I would do is set a ‘Sub Button Rows’ to more than 1 (the sub menu rows are separate to product button rows).

Also a nice feature added (think its new to V5) is category/sub category formatting for selected category.

The subcategory format will highlight the sub menu you are currently in;

1 Like

Thanks for the quick answer, Yes, It is an entity state, I’m not sure if {:Ocuppied} is a valid tag since I’m new to Sambapos and I saw that expression in another thread, is there any place where i can find valid expressions for rules custom constraints? I will try the tag as you post it and tell you if it worked later, thanks for the info about menus, I’m gonna work more around it.

Looks like you have added an additional ‘Status’ State… if your new to samba I can see this causing you allot of headakes but if its working for you then your doing well.

There are allot of default rules based on the Status state and usually the recommendation if to not interrupt the Status flow until you are more experienced in Samba but good job if you have managed to do so and not mess up other things.

You can run multiple states side by side, On more complex setups you will see many states for orders, tickets and entities.

Personally I usually try and not touch the status state and build separate state flows to ‘power’ new features.

Your example is a bit trickier to do so as you are wanting a formatted state for the entity screen which is set to format by status.
I setup a order formatting flow which again added additional states but rather than overide the default status flow i recreaded the order state flow with additional updates for my new states and in the majority of situation my new states were similar to the Status states but to avoid conflicts between two states ie submitted orders and gift or void, where status=submitted and gstatus=gift or void my flow would only have submitted as FState (format state) = Submitted OR Gift OR VOID.
Hope that makes sense.

It might sound complex and if dont understand dont worry for now, youll get it down the line.

Anyway, based on that last screenshot I believe the tag you need would be {ENTITY STATE:Status} = Ocuppied

Most printer template tags can be used in constraints, open a printer template and if not already showing on the right click template help.

You will find not all work on all rules, also things like {ENTITY STATE:x} would obviously need a ticket with entity to be loaded/opened to be able to pull a value for it.

Thanks a lot for the info, would you mind posting the full text inside the category/sub category formatting to make the selected category and subcategory red?

<panel red><bold><color white>{0}</color></bold></panel>

{0} is the placeholder for the category/sub-menu header.
Panel does the colour.
You can do all sorts, some put a > infront so >{0} so it just added a > in front of open one.
You could just make bold, just change font colour etc, all sorts you can do.


FYI @Andresb8 the verdict was <br/> not \r for linebreak in submenu;

Try this:

<block Left Yellow><size 60> </size></block><panel><bold><italic>{0}</italic></bold></panel><block Right Yellow><size 60> </size></block>


Nice, having something like block would be additionally beneficial when you have multiple colors for category buttons to increase contrast. :smile:

1 Like