Kitchen display with timer notification?

Which tabs? The Header? Or the blank areas to the left and right?

###Header:

###Blank Areas - Task Editor Widget Properties:

Set the Width & Height to an appropriate value for the size of your monitor.

2 Likes

Hi QMcKay - your tutorial is pretty awesome.

I have followed it and it works although the tasks do look unusual, I have some issues with that for example, in your screenshot it makes a nice set of squares side by side but mine only show an ugly list, can you let me know where I went wrong:

Here is how mine turned out:

Review your widget settings

1 Like

I have followed the steps and functionality sounds implemented but with one issue. please check the screen for the same.

One more thing when this completed orders will disappear?

Your Task display issue is caused by your Printer Template. Show your Template here so we can figure out what is wrong with it.

Yes, they will disappear after a certain amount of time. You can adjust the time in the Task Editor Widget Settings. The setting is called Completed Task Visibility Minutes


This is the full Tutorial for this setup:

I have used exactly the same template provided above.

[LAYOUT]
{ORDERS}

[ORDERS]
++{ORDER TIME}
(Table={ENTITY NAME:Table})
(Customer={ENTITY NAME:Customer})
<bold>{QUANTITY} {PRODUCT NAME}
[='{PORTION}'=='' ? '' : '<font Consolas>  <color #FF55FF33><size 17><bold>{PORTION}</bold></size></color></font>']
{SORTED ORDER TAGS}

[ORDERS:Gift]
<color White><bold><size 16><font Consolas>[=('{QUANTITY}'+'  ').substr(0,2)] {PRODUCT NAME}</font></size></bold></color>[='{PORTION}'=='' ? '' : '<font Consolas> <color #FF55FF33><size 14><italic>{PORTION}</italic></size></color></font>'] <bold> FREE</bold>
{SORTED ORDER TAGS}

[ORDERS:Void]
<color White><bold><size 16><font Consolas>[=('{QUANTITY}'+'  ').substr(0,2)] {PRODUCT NAME}</font></size></bold></color>[='{PORTION}'=='' ? '' : '<font Consolas> <color #FF55FF33><size 14><italic>{PORTION}</italic></size></color></font>'] <bold> VOID</bold>
{SORTED ORDER TAGS}

[SORTED ORDER TAGS]
<size 14><color Yellow><font Consolas>   [=('{ORDER TAG QUANTITY}'>1 ? {ORDER TAG QUANTITY} : ' ')] {ORDER TAG NAME}</font></color></size>

[SORTED ORDER TAGS:VIP Discount]
-- do not print

[SORTED ORDER TAGS:Happy Hour Discount]
-- do not print

[SORTED ORDER TAGS GROUP|Sauteed,OTS]

[SORTED ORDER TAGS GROUP:Sauteed]
<size 14><color LightSalmon>     ~~~ SAUTEED ~~~</color></size>

[SORTED ORDER TAGS GROUP:OTS]
<size 14><color LightSalmon>     ~~~ ON THE SIDE ~~~</color></size>

I have set Completed task visibility Minutes to Zero. even if i am seeing the completed task.
Zero might means it stays for unlimited time i.e. until work period ends.

what should i do to immediately remove completed tasks?

You can’t AFAIK. Set it to 1 Minute.

EDIT: this might work - check the box for Don't create Task History

Also, it would be a good idea to set the Sort Order to Ascending in the Task Editor Widget Settings. That way, the oldest Order is always listed first. When marked as Complete, it will shift the Order to the bottom, out of view. After x minutes, it will disappear completely.

Try this one instead, which is from the Tutorial …

[LAYOUT]
{ORDERS}

[ORDERS]
++{ORDER TIME} {ENTITY NAME:Table} {ENTITY NAME:Customer}
(Id={ORDER ID}-{NAME}-{TICKET ID})
(Color=#FF333333)
<bold>[=('{QUANTITY}'>1 ? ('{QUANTITY}'+'  ').substr(0,2) : '  ')] {PRODUCT NAME}</bold>
[='{PORTION}'=='' ? '' : '<font Consolas>  <color #FF55FF33><size 17><bold>{PORTION}</bold></size></color></font>']
{SORTED ORDER TAGS}

[ORDERS:Gift]
<color White><bold><size 16><font Consolas>[=('{QUANTITY}'+'  ').substr(0,2)] {PRODUCT NAME}</font></size></bold></color>[='{PORTION}'=='' ? '' : '<font Consolas> <color #FF55FF33><size 14><italic>{PORTION}</italic></size></color></font>'] <bold> FREE</bold>
{SORTED ORDER TAGS}

[ORDERS:Void]
++{ORDER TIME} {ENTITY NAME:Table} {ENTITY NAME:Customer}
(Id={ORDER ID}-{NAME}-{TICKET ID})
(Color=Red)
<bold>[=('{QUANTITY}'>1 ? ('{QUANTITY}'+'  ').substr(0,2) : '  ')] {PRODUCT NAME}</bold>
[='{PORTION}'=='' ? '' : '<font Consolas>  <color #FF55FF33><size 17><bold>{PORTION}</bold></size></color></font>']
{SORTED ORDER TAGS}

[SORTED ORDER TAGS:VIP Discount]
-- do not print

[SORTED ORDER TAGS:Happy Hour Discount]
-- do not print

[SORTED ORDER TAGS:Sides]
<size 14><color #FFFFAA55><font Consolas>   [=('{ORDER TAG QUANTITY}'>1 ? {ORDER TAG QUANTITY} : ' ')] {ORDER TAG NAME}</font></color></size>

[SORTED ORDER TAGS:Bread]
-- do not print

[SORTED ORDER TAGS:Meat]
<size 14><color #FFCCCCFF><font Consolas>   [=('{ORDER TAG QUANTITY}'>1 ? {ORDER TAG QUANTITY} : ' ')] {ORDER TAG NAME}</font></color></size>

[SORTED ORDER TAGS:Cheese]
<size 14><color Yellow><font Consolas>   [=('{ORDER TAG QUANTITY}'>1 ? {ORDER TAG QUANTITY} : ' ')] {ORDER TAG NAME}</font></color></size>

[SORTED ORDER TAGS:EXTRA Addons]
<size 14><color #FF55FF55><font Consolas>   [=('{ORDER TAG QUANTITY}'>1 ? {ORDER TAG QUANTITY} : ' ')] {ORDER TAG NAME}</font></color></size>

[SORTED ORDER TAGS:Veggies]
<size 14><color #FFCCFFCC><font Consolas>   [=('{ORDER TAG QUANTITY}'>1 ? {ORDER TAG QUANTITY} : ' ')] {ORDER TAG NAME}</font></color></size>

[SORTED ORDER TAGS:Condiments]
<size 14><color #FFFFCCCC><font Consolas>   [=('{ORDER TAG QUANTITY}'>1 ? {ORDER TAG QUANTITY} : ' ')] {ORDER TAG NAME}</font></color></size>

[SORTED ORDER TAGS GROUP|EXTRA Addons,Sauteed,OTS,Sides]

[SORTED ORDER TAGS GROUP:EXTRA Addons]
<size 14><color LightSalmon>     ~~~ ADDONS ~~~</color></size>

[SORTED ORDER TAGS GROUP:Sauteed]
<size 14><color LightSalmon>     ~~~ SAUTEED ~~~</color></size>

[SORTED ORDER TAGS GROUP:OTS]
<size 14><color LightSalmon>     ~~~ ON THE SIDE ~~~</color></size>

[SORTED ORDER TAGS GROUP:Sides]
<size 14><color LightSalmon>     ~~~ SIDES ~~~</color></size>

I just tried this on a fresh SambaPOS 5 with a new database. It crashes right after I add the task editor widget to the Kitchen entity screen. Now anytime I open it the same happens, I even tried deleting and re-adding the kitchen entity screen. Any suggestions here? The crash report is as follows:



[General Info]

Application: SambaPOS
Version: 5.1.58
Region: en
DB: SQ
Machine: HAPPYSERVER
User: zero
Date: 3/23/2016
Time: 4:34 AM

User Explanation:

zero said “”

[Exception Info 1]

Top-level Exception
Type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: Samba.Modules.TaskModule
Stack Trace: at Samba.Modules.TaskModule.Widgets.TaskEditor.TaskEditorViewModel.b__70_0()
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at Samba.Presentation.App.Main()


[Assembly Info]

mscorlib, Version=4.0.0.0
DevExpress.Xpf.LayoutControl.v14.1, Version=14.1.11.0
System.Xml, Version=4.0.0.0
DevExpress.Xpf.Grid.v14.1, Version=14.1.11.0
System, Version=4.0.0.0
DevExpress.Xpf.Grid.v14.1.Core, Version=14.1.11.0
WindowsBase, Version=4.0.0.0
System.Xaml, Version=4.0.0.0
Samba.Domain, Version=1.0.0.0
System.Core, Version=4.0.0.0
PresentationFramework, Version=4.0.0.0
Samba.Infrastructure, Version=1.0.0.0
Microsoft.Practices.Prism, Version=4.0.0.0
System.Runtime.Serialization, Version=4.0.0.0
Microsoft.Practices.Prism.MefExtensions, Version=4.0.0.0
System.ComponentModel.Composition, Version=4.0.0.0
PresentationCore, Version=4.0.0.0
DevExpress.Xpf.Core.v14.1, Version=14.1.11.0
Samba.Services, Version=1.0.0.0
Samba.Presentation.Services, Version=1.0.0.0
System.Windows.Forms, Version=4.0.0.0
System.Drawing, Version=4.0.0.0
Stateless, Version=1.0.0.0
Samba.Persistance, Version=1.0.0.0
PropertyTools, Version=2012.4.14.1
Samba.Localization, Version=1.0.0.0
ReachFramework, Version=4.0.0.0
Samba.Infrastructure.Data, Version=1.0.0.0
EntityFramework, Version=6.0.0.0
FluentValidation, Version=3.4.0.0
Omu.ValueInjecter, Version=2.3.0.0
Microsoft.Practices.ServiceLocation, Version=1.0.0.0
Microsoft.CSharp, Version=4.0.0.0


[System Info]

Operating System
-Microsoft Windows 10 Pro
–CodeSet = 1252
–CSDVersion =
–CurrentTimeZone = -360
–FreePhysicalMemory = 8951936
–OSArchitecture = 64-bit
–OSLanguage = 1033
–ServicePackMajorVersion = 0
–ServicePackMinorVersion = 0
–Version = 10.0.10240

Machine
-HAPPYSERVER
–Manufacturer = MSI
–Model = MS-7599
–TotalPhysicalMemory = 12884037632
–UserName = HAPPYSERVER\zero


@QMcKay sorry to bother you. I have followed your tutorial and works just great, i just have one question. I am trying to add more functionality to it so it fits to my kitchen process more.

When the kitchen finish cooking an order and they select it and click Mark as Complete i would like to print the same order it appeared on the screen on a regular thermal printer so they can put the paper on the plate for the waiter to know where it goes.

They recommended the following:
New rule for order state updated
Add a custom constraint of order state matches completed (if thats what your order state is) i dunno whichj state it is,???
Add your print job action and save
Now whenever an order state is updated to completed the rule will fire and print

Can you point me on which rule do i need to make the changes.
Thank you so much

That will not quite work. There is no simple way to update the Order State for the Order shown on the Task Card. SambaPOS will not know which Order to update, because the Action for Update Order State is designed for use in the POS Ticket Display, having selected an Order on the screen. There is no other referential identifier for Update Order State.

So… I need to think about this a bit. I am thinking:

  • use the Task Identifier (which should contain the ORDER UID) to identify the ORDER ID for the Order on the Task Card
  • once the ORDER ID is obtained, use Select Orders Action to select the Order, then fire the Update Order State Action for the selected Order
  • that ^ will probably require opening the Ticket, which we don’t really want to do, but maybe not - need to try it.

Hmm, so we might need a different way to update the Order State…

  • direct DB Update (“difficult”, and SambaPOS will not be “aware” that the State has been updated)
  • is there an API helper for Orders? (I don’t recall seeing one)
  • GQL Update (probably the best idea)

Uh-oh, there is no GQL Mutation for updating Orders … @emre?

There is no direct order update API as updating an order is literally updating a ticket. So you need to load terminal ticket, update orders by using updateOrderOfTerminalTicket and submit ticket.

@emre, to make that work, we need to:

registerTerminal(user,ticketType,terminal,department)
loadTerminalTicket(terminalId,ticketId)
updateOrderOfTerminalTicket(terminalId,orderUid)
closeTerminalTicket(terminalId)

But now I look deeper, there is no State parameter for updateOrderOfTerminalTicket … so how can we accomplish this?

There must be a simpler way.

Yes you need to do that to bring ticket to an editable state. In fact when I think about that we never needed to just update an order state out of ticket. What is the reason of that? We implemented tasks (instead of ticket lister) to detach kitchen flow from tickets because when tickets gets paid you can’t change order states. Now are we getting back to that?

Ok. The request is to Print a paper copy of the Order. The Order in this case is a Task on the Kitchen Display. When it is marked as Complete, we want to have a physical paper copy printed at that time to attach to the plate.

Someone suggested updating the Order State and using a Rule for Order State Updated to fire a Print Job. I was going from that suggestion. Maybe there is a simpler method that is being missed here.

Can we Print a Task (not to screen Task Editor Widget, but to paper)?

1 Like

Hmm… sorry didn’t read OP properly. So we need to print tasks?

Yes, that is the idea AFAIK.

I think we can use REPORT TASK DETAILS for that.

So while executing report we need to replace $TABLE value to be able to fetch related tasks. That can be achieved by using settings but I added Parameters setting to Execute Print Job action to make it a little simpler. I think that will be useful for other cases as well.

I tested it on my example setup so it prints task when all orders for a table is ready.

As a quick solution for OP some unique value (order uid maybe?) can stored as a task custom field and it can be printed when a task marked as completed. Until 5.1.61 released settings can be used to pass task value to template but waiting for next update might be a better idea.

PS: While using {REPORT TASK DETAILS}, T.ContentText field can be used to receive content that cleaned from formatting tags. For example if <b> tag is used to format a part of content for screen you won’t see that tag if you read content by using T.ContentText field.

2 Likes