Dine In or Takeaway Help

Alright sweet. I’ll test this out and update :). Thanks for the help.

Just one more question. Just to clarify, In my custom entity display, Take away and dine in are the buttons.
When dine in is selected, A table number must be picked before it creates ticket. When a table is picked, how could I automate it so that when a table is picked, it automatically inserts the ticket tag as Dine in.

When take away is clicked, it creates a ticket straight away, when this is done, I would want it to put Take away ticket tag as soon as its created.

Use Update Ticket Tag Action in the same Rule.

Another method is use Ticket created event and constrain to tables entity type.

Which rule do you mean? The rule I created for Dine In button simply just goes to the table number selection.

I looked at the possible rules that I could use the update on, but I don’t see any.
I think I might be making this more complicated than it actually is lol.

Hey guys. Finally coming back on track, but thought of a different way. wanted to see if this was possible.

I felt I was making this more complicated than it has to be. I have a feeling that through actions and rules defined by ticket tag type, I could get it to print individual print templates.

I’ve created in Printer Templates
1- Dine In Receipt Template- It will print {ENTITY NAME: Tables}
1- Dine in Kitchen Template- It will print {ENTITY NAME: Tables}
1- Take Away Receipt Template- Prints Ticket number based on {TICKET TAG:Order No}
1- Take Away Kitchen Template- Prints Ticket number based on {TICKET TAG:Order No}

1- Print Job for DINE IN Receipt- Assigned to DINE IN RECEIPTTEMPLATE
1- Print Job for DINE IN Kitchen- Assigned to DINE IN KITCHEN TEMPLATE
1- Print Job for TAKE AWAY Receipt- Assigned to TAKE AWAY RECEIPT TEMPLATE
1- Print Job for TAKE AWAY Kitchen- Assigned to TAKE AWAY KITCHEN TEMPLATE

Now, I’ve setup 2 ticket tags named DINE IN & TAKEAWAY. What I’ve done is, I’ve made it that when TAKEAWAY ticket tag is selected, an ORDER number is automatically assigned.
When DINE IN ticket tag is selected, it doesn’t have ticket tag.

Could I make it so that when DINE IN entity is selected, and ONLY when a TABLE number is selected, it automatically attaches the DINE IN ticket tag.
And when TAKEAWAY is selected, it attaches the TAKEAWAY tag…

Also is there a way through Actions and Rules that when a table number is selected, it automatically prints the DINE IN receipt and kitchen print template. And likewise for TAKEAWAY, it would select the print the TAKEAWAY receipt and kitchen template?

Or is there another less complicated way to implement this?

UPDATE: I did try to use that ternary expression, didn’t work out. I think It had something to do with the way I setup my ticket tags, since then I have deleted the extra ticket tags and just left the DINE IN as a separate ticket tag and TAKEAWAY as another ticket tag that can be pressed.

I’m thinking the process would be similar to how we used ORDER NO ticket tag to automatically assign an order number to the ticket, which auto increments and resets after WP has ended.

You have some good ideas and definitely worth a try. I have some suggestions to make these conversations more constructive and help you get better suggestions faster. When you tell us that you tried something but it doesnt work please show us your work that you tried via screenshot. Often it could be a typo or wrong use of syntax and a second set of eyes can catch it for you.

Always provide detail of what you tried with actual examples otherwise we can only guess at what it might be. If its a simple mistake we may never catch that unless you provide us examples.

That’s a fair call. I will try to add more screen shots and provide more accurate information to give you a better picture of what I have done and tried. I really want to show you a small video example like a GIF I see you guys use when wanting to show something rather than simply screenshotting, I just don’t know how to do that.

Below is the screenshot of my ticket template

And my Print JOBS

My Dine in and Takeaway Entity screen

Currently, when you press DINE IN, it goes to

And of course when TAKE AWAY is selected, it goes to

A user has to manually select DINE IN or take away regardless of the method they choose on the entity screen.
Once a selection is made.

At the moment, when DINE IN tag is selected, It just doesn’t print the TICKET TAG:Order NO(A auto increment generated number) But since the ticket template still shows YOUR ORDER NUMBER IS…

It shows as the highlighted text shows… But without the Order number because it’s not tagged on the ticket.

So in a sense, it was doing what I wanted it to do, but to me it made no sense why on the customer receipt it should still show “YOUR ORDER NUMBER IS” without an order number.

This is why and where I decided, its best to create 2 print jobs and templates, each specifying DINE IN or TAKE AWAY as shown in the screenshots above.

Now what I want to try and make it do, is when a user picks a table number, it automatically attaches only the DINE IN ticket tag, and when it prints the receipt, it would use the DINE IN print jobs.

When a user clicks TAKEAWAY, then there is no table number attached, therefore it automatically tags the ticket with TAKEAWAY and Order No tags, prints according to the print job TAKEAWAY.

I think the use of custom constraints could help me do this, but honestly, I’m not sure how to configure custom constraints. I’ve added many features following tutorials, and I’ve seen what type of constraints are used, I just don’t know how to really tie it together.

So far I have created 2 actions.
Here are all my actions so far

Action for Receipt Dine in

Action for receipt take away

Action for Kitchen Dine in

Action for Kitchen Take Away

In the rules
I have a rules which fires when TAKE AWAY ticket tag is press, it attaches an order number also.

This is the rule for tagging DINE IN on ticket when DINE IN tag is selected.

Now I need to create a rule which fires a print job based on the ticket tag selected. Can this be done by simply creating only 1 rule, or would I need 2 rules, to execute separate print jobs since I have 2 for each tag?

Sorry didnt read the whole post but based on the last paragraph;

You can do it either way, either separate rules which rule constraints OR a single rule with action constrains.
Can be advantages to either method.

Ok I have made 4 actions. 2 for Dine in(Bill and Kitchen) and 2 for Takeaway(Bill and kitchen) .

What event do I put the actions under to start configuring?

At what point are you defineing dine in or take out, that entity screen right.
What are the buttons? entity or automation commands?

When Take Away is selected, the TAKEAWAY tag and Order No tag is automatically put on the ticket.
When Dine In is selected, then they go to table entity screen, they choose a table, and only when a table is chosen, samba tags the ticket with Dine In.

So the order is defined by Ticket tags, which are previously defined either by Tables Entity or If there is not table entity, its automatically set to Take Away.

You can refer to the rules set to make this happen in my other post

Sorry, misread the question, you asking where to put print actions not the tag actions as already dont that.

The default event for kitchen printer is ‘Ticket Closing’

So something like this?

Sorry i’m such a newbie when it comes to rules haha. I’m still learning a lot about how these rules work and how I can use them to set the system up exactly how either I or a client of mine wants it.

Thanks for bearing with me till now.

Your constraint is wrong.
Should be {TICKET TAG:<tag name>} Equals <tag value>

like this?

If those are the tag name and values then should do the job.

You need to make sure these new rules are above/before the default closing rule as that changes states to submitted and print actions are looking to print new so if they fire after they wont do anything as there wont be any New orders.

Alright I’m trying it now. I’ll keep you posted. Finally got one big part done, this is the second last part of the setup left. I’m excited :smiley:

EDIT: One more question, if the kitchen doesn’t have an order to be printed, will it make any difference? Or will it only execute kitchen if there is an order for the kitchen within the DINE IN ticket(as an example)?

Well, It works :smile: :smile: :smile: :smile: :smile: :smile: :smile: ! It prints according to Ticket tag, it’s awesome. Thanks to everyone for your support and patience dealing with my newbie brain. It has really helped me learn and understand samba a lot more now. I’m at the last milestone before I make minor tweaks to the setup I’ve put together. I can’t wait to finish it and show the results. It might look simple, but I found the setup could be ideal for many restaurants and fast food or coffee places or even bars and bistros that have diners and take away options. I’ll be open to suggestions. Can’t wait to share my work :).

Thanks again, it could not have been done without all your help.

sir iam trying the same approach but my button does not work can you please help or direct me to correct tutorial thanks


1 Like