A few help needed for V4

Yes sorry had some businmess to do. I am building it all at once then will post screenshots.

sorry to trouble you on this Kendash! Ok sure I will wait here. Thanks!

An action to assign the entity to the ticket.

An action to Update that Entity to add Phone Number.

Action to create the Entity.

ok im following so far :wink:

Action for handeling if customer presses cancel.

Clone the New Order Adding Rule and map it only to department Take Away.

Put your new Customer Press Cancel Button action at top of it and put Close Ticket action at bottom and use the following action constraints:

'{ENTITY NAME:Customers}' == ''

Create a Ticket Created rule and insert your new actions in it as follows:
Map it only to Take Away department.

1 Like

To handle printing of tickets we need a new flow for that as well. We also need to get rid of Settle and Close buttons for Take Away department so delete the mapping for those Automation Commands for now dont delete them. You probably dont need them for Dine In kiosk either. We can map them only for Server Kiosk since only server will be allowed to settle etc. Customer kiosk wont need them.

Create a new button call it Finished with Order. And create an automation command executed rule and put close ticket action inside it. Map it to Customer Kiosk only and put it Under Ticket Row for visibility.

customer kiosk might look like this:

You can then put both print jobs to print when that button is pressed.

With version 5 it would be easy to print a barcode with {TICKET ID} at this point using Save Ticket action but with version 4 we would have to rewrite the way it prints the tickets so it prints them on Ticket Closed rule.

Save Ticket Action saves ticket so it generates a Ticket ID. Ticket Id is not generated until ticket closed. So with version 4 we would have to create a system for printing tickets on Ticket Closed event. Well you dont want it to print everytime a ticket is closed so we would need to create a State FLow to determine if ticket should be printed or not. I can help you do that if that sounds interesting.

Version 5 it would just be a single action inserted into the same rule to do the same thing.

1 Like

I hope I shared enough for you to understand and customize it for your need. I need to take a break for a while.

thank you so much Kendash. Let me try it out tomorrow and I will keep you updated of the results :smiley:

Hi kendash I always got this crash error after i fill in the name and phone no on the popup screen

and these are the message under detailed report

-----------------------------
[General Info]

Application: SambaPOS
Version:     4.1.82
Region:      en
DB:          CE
Machine:     ARCNETWORX
User:        johnson
Date:        14-Oct-15
Time:        10:20 AM

User Explanation:

johnson said ""
-----------------------------

[Exception Info 1]

Top-level Exception
Type:        System.Reflection.TargetInvocationException
Message:     Exception has been thrown by the target of an invocation.
Source:      mscorlib
Stack Trace: at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   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()

Inner Exception 1
Type:        System.Reflection.TargetInvocationException
Message:     Exception has been thrown by the target of an invocation.
Source:      mscorlib
Stack Trace: at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   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.Threading.DispatcherOperation.Wait(TimeSpan timeout)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherOperation operation, CancellationToken cancellationToken, TimeSpan timeout)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at Samba.Presentation.Services.Common.ExtensionMethods.PublishEvent[TEventsubject](TEventsubject eventArgs, String eventTopic, Boolean wait)
   at Samba.Presentation.Common.Services.ApplicationState.<NotifyEvent>b__9(ActionData x)
   at Samba.Services.Implementations.AutomationModule.ActionDataBuilder.InvokeFor(Action`1 dataAction)
   at CallSite.Target(Closure , CallSite , Object , Action`1 )
   at Samba.Services.Implementations.AutomationModule.RuleExecutor.ExecuteWith(Object dataParameter, Action`1 dataAction)
   at Samba.Services.Implementations.AutomationModule.NotificationService.NotifyEvent(String eventName, Object dataParameter, Int32 terminalId, Int32 departmentId, Int32 userRoleId, Int32 ticketTypeId, Action`1 dataAction)
   at Samba.Presentation.Common.Services.ApplicationState.NotifyEvent(String eventName, Object dataObject)
   at Samba.Presentation.Services.Implementations.TicketModule.TicketService.CreateTicket()
   at Samba.Presentation.Services.Implementations.TicketModule.TicketService.OpenTicket(Int32 ticketId)
   at Samba.Modules.PosModule.PosViewModel.OpenTicket(Int32 id)
   at Samba.Modules.PosModule.PosViewModel.OnMenuItemSelected(EventParameters`1 obj)
   at Microsoft.Practices.Prism.Events.EventSubscription`1.InvokeAction(Action`1 action, TPayload argument)
   at Microsoft.Practices.Prism.Events.EventSubscription`1.<>c__DisplayClass2.<GetExecutionStrategy>b__0(Object[] arguments)
   at Microsoft.Practices.Prism.Events.EventBase.InternalPublish(Object[] arguments)
   at Microsoft.Practices.Prism.Events.CompositePresentationEvent`1.Publish(TPayload payload)
   at Samba.Presentation.Services.Common.ExtensionMethods.Publish[TEventsubject](TEventsubject eventArgs, String eventTopic, Action expectedAction)

Inner Exception 2
Type:        System.InvalidOperationException
Message:     Sequence contains more than one element
Source:      System.Core
Stack Trace: at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source)
   at System.Data.Objects.ELinq.ObjectQueryProvider.<>c__DisplayClass0`1.<GetElementFunction>b__5(IEnumerable`1 sequence)
   at System.Data.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot)
   at System.Data.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[S](Expression expression)
   at System.Linq.Queryable.SingleOrDefault[TSource](IQueryable`1 source, Expression`1 predicate)
   at Samba.Infrastructure.Data.SqlData.ReadOnlyEFWorkspace.Single[T](Expression`1 predictate, Expression`1[] includes)
   at Samba.Persistance.Data.Dao.SingleWithCache[T](Expression`1 predictate)
   at Samba.Persistance.Implementations.CacheDao.GetEntityByName(Int32 entityTypeId, String entitiyName)
   at Samba.Services.Implementations.CacheService.GetEntityByName(String entityTypeName, String entityName)
   at Samba.Modules.TicketModule.ActionProcessors.ChangeTicketEntity.Process(ActionData actionData)
   at Samba.Services.Common.RuleActionTypeRegistry.ProcessAction(String actionType, ActionData actionData)
   at Samba.Services.Implementations.AutomationModule.AutomationService.ProcessAction(String actionType, ActionData actionData)
   at Samba.Modules.AutomationModule.AutomationModule.<OnInitialization>b__4(EventParameters`1 x)
   at Microsoft.Practices.Prism.Events.EventSubscription`1.InvokeAction(Action`1 action, TPayload argument)
   at Microsoft.Practices.Prism.Events.EventSubscription`1.<>c__DisplayClass2.<GetExecutionStrategy>b__0(Object[] arguments)
   at Microsoft.Practices.Prism.Events.EventBase.InternalPublish(Object[] arguments)
   at Microsoft.Practices.Prism.Events.CompositePresentationEvent`1.Publish(TPayload payload)
   at Samba.Presentation.Services.Common.ExtensionMethods.Publish[TEventsubject](TEventsubject eventArgs, String eventTopic, Action expectedAction)

-----------------------------

[Assembly Info]

Samba.Services, Version=1.0.0.0
mscorlib, Version=4.0.0.0
System, Version=4.0.0.0
Microsoft.Practices.Prism, Version=4.0.0.0
WindowsBase, Version=4.0.0.0
Samba.Infrastructure, Version=1.0.0.0
Samba.Infrastructure.Data, Version=1.0.0.0
PresentationFramework, Version=4.0.0.0
System.Xaml, Version=4.0.0.0
Samba.Presentation.Services, Version=1.0.0.0
FluentValidation, Version=3.4.0.0
Samba.Domain, Version=1.0.0.0
DevExpress.Xpf.Grid.v14.1, Version=14.1.6.0
DevExpress.Xpf.Grid.v14.1.Core, Version=14.1.6.0
PresentationCore, Version=4.0.0.0
Stateless, Version=1.0.0.0
System.Core, Version=4.0.0.0
System.Drawing, Version=4.0.0.0
DevExpress.Xpf.Core.v14.1, Version=14.1.6.0
EntityFramework, Version=4.4.0.0
System.Windows.Forms, Version=4.0.0.0
System.ComponentModel.Composition, Version=4.0.0.0
Samba.Localization, Version=1.0.0.0
Microsoft.CSharp, Version=4.0.0.0
Microsoft.Practices.ServiceLocation, Version=1.0.0.0
Samba.Persistance, Version=1.0.0.0
Microsoft.Practices.Prism.MefExtensions, Version=4.0.0.0
PropertyTools, Version=2012.4.14.1

-----------------------------

[System Info]

Operating System
-Microsoft Windows 10 Home
--CodeSet = 1252
--CSDVersion = 
--CurrentTimeZone = 480
--FreePhysicalMemory = 4108284
--OSArchitecture = 64-bit
--OSLanguage = 1033
--ServicePackMajorVersion = 0
--ServicePackMinorVersion = 0
--Version = 10.0.10240

Machine
-ARCNETWORX
--Manufacturer = Dell Inc.
--Model = Inspiron 5448
--TotalPhysicalMemory = 8500232192
--UserName = ARCNETWORX\johnson

-----------------------------

You have multiple entities with same name.

I have these 2 entities and its not the same name

I mean duplicate entities not entity screens.

Check Manage > Entities > Entity List.

Hi emre you are right. thank you

also right now as you can see on the attached image i created the “Click here to print your bill” button but its not working. The settle button should not appear under ticket and the only way to close the ticket for the next new order is to click on “Click here to print your bill” and i also attached the image of my print bill settings

and is there anyway to enable the insert of same entity name? Because some customers names happens to be the same and we won’t want a error for that

Clear Enabled States for button and after making it work configure for which ticket states you’ll want to enable this button.

Create a custom field for customer name and use something unique like Phone Number as entity name. By using Primary Field.. settings of entity type you can fine tune customer creation, search and appearance on tickets. You can find discussions regarding that by searching forums.

OK i got it to work for the click here to print your bill button

Emre can you tell me the steps for the below? Im having trouble finding it. and also is there anyway to delete the customer entity? As it always says its being used by a ticket and so it cannot be delete

Create a custom field for customer name and use something unique like Phone Number as entity name. By using Primary Field
 settings of entity type you can fine tune customer creation, search and appearance on tickets. You can find discussions regarding that by searching forums.

Once you have added an entity to a ticket and thatbticket has been created and settled you cannot delete the entity because it is assigned to a ticket saved in the database

I see
 thanks so much for the explanation. Do you happen to know how to create fields that enable duplicate entry of the entity? For example 2 same entity name “Johnson” and “Johnson” as now its crashing each time a same entity name is created

You cant have more than one entity with the same name if your using name as the primary field as @emre has explained above

What you need to do is set the primary field as a unique value such as phone number as suggested. Once you have set the primary field to be a unique value you can have another field for customer name which will then accept the same value. So you could have 100 customers named john but as the phone number field is the primary field they will have 100 different phone numbers in them since no phone number will be the same as anyone elses

This is he only way to have entities with the same name, change primary field from name to something like phone number

Ok i think im catching up here. But can you tell me which of these 3 entity should i edit the primary field?

None of the above!
Manage->Entity->Entity Type