Force table selection after kitchen order

I have followed a guide and created a kitchen display. It works like a charm.

My workflow is that customers normally order and pay first, and then sits down at a table. Even this works fine after a few modifications of the kitchen display.

This is what I like to implement now:

If any order on a ticket is marked as “kitchen order”, I shoudn’t be allowed to close or settle the ticket without first selecting a table.

However, if no order on the ticket is a “kitchen order”, ie. someone is only bying a soda, I could settle the ticket without selecting a table.

Please help me! :smile:

Hello David.
Review Ticket State feature.

As ticket state changes you can enable / disable or show / hide ticket’s command buttons. So you can configure SambaPOS to enable / disable close and settle buttons as a specific ticket state changes. (eg CanSettle). Finally you can setup actions & rules to update ticket state to (CanSettle=False) when kitchen order added and (CanSettle=True) when a table selected.

Great approach!

But what if anoother kitchen order is added after a table is selected. CanSettle will be false again? I guess I need to check if there is a table selected or not, before setting CanSettle to false? But how?

It would be great if there was some type of information or warning to help the user understand why the ticket can’t be settled. Could the check be done after Settle is clicked, and then show a messagebox if settle is not possible?

@emre Any solution to this?

What he is saying is that you would configure a new ticket state of can or cant settle.
One way might be to have a rule or two which checks for a table number each time an order is added.
So order added --> rule 1 with constraint that table is selected {ENTITY:Tables} is not null --> action of change state to can settle/close
order added --> rule 2 constraint that no table is selected {ENTITY:Tables} is null --> action to change state to cannot settle or close.
This could be consolidated to one rule with the constrains on the actions to be fired rather than the rule constrains but I find the rule constrains easier to work with on most occasions.
You would then need to constrain your settle and or close routes to only be available if that state is can settle/close.
emre or kendash could probably give a better/cleaner option but that should prevent you from closing a ticket/printing the order to the kitchen without setting a table.
You could even add an ‘ask question’ prompt similar to those used on the fast payment setups that if the close/settle button is pressed while the state is cannot settle a prompt flashes saying please select table first but that would depend on how you decide to constrain the close/settle routes ie if you disable the button given cannot settle state you will not be able to press it in the first place.
Alternatively maybe you could use the shell subtile module to add a red banner at the top of the ticket list that has a red BG and message of NO TABLE SELECTED. or why not both :slight_smile:
Dont know your environment but is you also have bar/over the counter sales you may also which to constrain the rules to only be valid for kitchen printable orders. That way a over the counter drinks sale would not require a table to be set to be settled.
There may be a loophole in there somewhere but without configuring myself (am away from the desk atm)
Should be enough to get you started in the right direction.

Thinking about it this is actually a good function, if no one else offers more detail/screen shots etc I will try and find a bit of time this evening to configure and upload some screen shots etc and more details.
Let me know how you get on in the meantime.

Have you solved this issue yet?
I missed that you were using kitchen display rather than printer but in principle a constraint on closing a bill without a table number (including adding additional items) would work similarly for both situation just with different output.
If the order has already been sent to kitchen (especially on display rather than printer) you would probably need to add something to enfisize it’s an addon so the kitchen doesn’t miss that it’s been added.
This is an issue I will face with kitchen printer in the same way.
Let me know if your still in need and will try and share my rules sooner than later.
It may help - may not but if your sorted I’ll probably hold off till I get more spare time.

Thank’s alot!
I have read your answer, and I think the solution is in there. I will try implementing this later this week, and will let you know how it went. :smile:

1 Like

At first I had problems with the {ENTITY:Tables} is null but after some searching I found out that {ENTITY NAME:Tables} is null worked much better. :wink:

I still have one problem tho…

This workflow is working fine:

  1. Add one or many items that triggers order state “Kitchenorder” (thus being sent to kitchen display after settle). Ticket state “TableRequied” is set.
  2. Try to click Settle-button. Since Ticket state “TableRequired” is set, this is not possible and a popup message is shown to inform you about this.
  3. Select a table. “TableRequired” is cleared
  4. Add more items that triggers order state “Kitchenorder”. Because a table is selected, ticketstate “TableRequired” is NOT set.
  5. Settle

This workflow is also working fine:

  1. Add a product that doesn’t trigger order stage “Kitchenorder”. The ticket state “TableRequired” is NOT set.
  2. Settle

However, this workflow is NOT working. Obviously!

  1. Add a item that triggers order state “Kitchenorder” (thus being sent to kitchen display after settle). Ticket state “TableRequied” is set.
  2. Add a item that triggers order state “Kitchenorder”. Ticket state “TableRequied” is set again.
  3. Click on the last orderline, and click the button for clearing the order state “Kitchenorder” (because the sandqwich or whatever is already made and should not be sent to kichen display. Implemented this by myself (*smiling proudly*)
  4. Try to settle. Not possible because a table selection is Requied

It’s not a good idea to clear the “TableRequied” when the button for clearing order state “Kichenorder” is pressed, because there are already another orderline that IS a kitchenorder and thus requie a table.

The only solution I can think of is that when Settle is clicked, we loop thru the order lines and check if any of them is a kitchenorder. In that case a table is required. But is it even possible to loop thru order lines like that. And how?

Why do you need to clear the kitchenorder sate? Would it not be better to constrain the orderstate action to only groups/products which are kitchenorder? or am i misunderstanding?

Let me explain that a little better

All orders are made “over counter”. All food are sent to kitchen display, but drinks etc. are served over counter. Customer is given a “table number” (more like a little sign with a number on it, that the customer brings to the table). Customer takes a seat at a table.

However. Sometimes we prepare some food in advace (sandwiches, cold salads). If the customer orders an aldready prepared item, we remove “kitchenorder” from order line. Customer gets the item right away over counter. No table selection is required IF there isn´t other order lines on the same ticket that ARE sent to the kichen, of course.

EDIT: And yes. orderstate action “Kitchenorder” IS constrained to only products wich are food. Drinks etc. never get the “kitchenorder” orderstate.

EDIT2: spelling

Could you not have a separate button to remove table requirement of the cases when you have preprepared?

Well, I guess I could… but it would be possible to send orders to the kitchen without a table selected…

I am thinking about another possible solution:
I’am currently only checking if the “TableRequied” is set or not (effectivly boolean like true or false), but what if the ticketstate “TableRequied” was replaced by lets say “NumberOfKitchenOrders” with a value (is that possible?)

When a kitchenorder is added, the value of “NumberOfKitchenOrders” increased. When a kitchenorder is removed (just the orderstate or the whole order) the same value is decreased.

When pressing Settle, we check that either {ENTITY NAME:Tables} is set OR “NumberOfKitchenOrders” is 0 (or NULL).

Is this a posslible approach to solve my problem?

Sounds like a good idea, am not so versed in the ticket state options so cant say if it would be possible/work or not though.

I have a fair understanding of program setting options and pretty sure you could do this with a local=true program setting update. Action for program update has a increase and decrease action… :slight_smile:

You could add the decrease setting value action to your ‘not kitchen order’ button - that could work.
you settle constraint would then be {ENTITY NAME:Tables} is set OR {SETTING:kitchenorder} is 0