[Resolved] Ticket Service State does not change on void since 4.1.62 upgrade

Notice Service: Full when there are only bar orders left on ticket after voiding all kitchen orders.





@emre @Jesse Any Idea why Update ticket Service State Action does not change the Ticket Service state to empty when the last kitchen Order on Ticket is voided ?

If your wanting to clear a state that is already set you need to define current state and then leave state blank. I am looking at it and trying to follow your flow give me a minute.

The first screenshot is that the current working system or was that how it used to work? I am not following that.

1 Like

its current working system

Try adding a Display Ticket action with Ticket ID=0 after each Ticket State change action in those rules. See if that works. Can you show the Update Ticket Service state action as well?

Display Ticket action added to rules. Ticket Service state remained Full

My states are changing correctly. It must be something with your constraints. I could not see the entire ticket it was scrolled up. Your 100% sure you voided all non bar items?

EDIT NM of course you did the math adds.

I am not sure. Without seeing it run myself its hard to say whats causing it. You did not change how the first Void rule works did you? The update order action that is in it i mean?

well it was working on 4.1.61 . i know the constraints are correct because it worked on 4.1.61, and it still works on my Settle Cash automation command button . In other words, once i click Settle Cash button, the Ticket Service state gets updated in accordance with identical constraints.

You changed NOTHING after update? I mean did you do anything at all since update even if you think it doesnt relate to this?

I only implemented the Remove Calculation feature that @emre added. However i removed it from the relevant void button rule when i noticed this issue, however i still have it on relevant Settle button rule. I will move it completely to see if any difference.

UPDATE: No difference after i completely removed and also deleted the Remove Calculation based action, i.e. Update Ticket Calculation

So its specifically with void. Now I wonder if its the Update order action… or if its not reading Bar status correctly. If you void one of the bar items AFTER you have voided all the kitchen items… does it change?

Even though they are voided I am wondering if it is still reading the Kitchen Status value in {ORDER STATE TOTAL:Bar} Equals {TICKET TOTAL}

1 Like

it does change when i void one of the bar items :slight_smile: perhaps the problem is related to execution timing of the relevant actions?

I think we need to separate the actual Update Ticket Service state from Void… it needs a different check… Maybe make it check if it needs to change Service state when Gift state is changed after pressing void instead of when void is pressed.

1 Like

On previous version constraint check for rules that handles same event was executing one by one as one of the rules about to run. That was permitting an action to change the constraint values for next rule. It might sound useful but I’ve discovered some cases that generates unpredictable results. Sounds like your setup was benefiting from that. With new version all rule constraints should pass at the time you click on void button.

2 Likes

I did what @Jesse suggested , and now the order voiding rules and actions are working as expected. Thanks @emre for explanation of changes & @Jesse for suggesting this alternative setup.

Dear @Emre, I had this rule:


That was working great…
now I read what you said:

but to be honest I am completely lost…

With my rule I get this screen:

Two times DESCONTO, and then I nice error:

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

Application: SambaPOS
Version:     4.1.63
Region:      en
DB:          SQ
Machine:     SERVIDOR
User:        Gerlando
Date:        02/10/2014
Time:        22:59

User Explanation:

Gerlando said ""
-----------------------------

[Exception Info 1]

Top-level Exception
Type:        System.ArgumentException
Message:     An element with the same key 'Desconto' already exists in the ExpandoObject.
Source:      System.Core
Stack Trace: at System.Dynamic.ExpandoObject.TrySetValue(Object indexClass, Int32 index, Object value, String name, Boolean ignoreCase, Boolean add)
   at System.Dynamic.ExpandoObject.TryAddMember(String key, Object value)
   at System.Dynamic.ExpandoObject.System.Collections.Generic.IDictionary<System.String,System.Object>.Add(String key, Object value)
   at Samba.Services.Implementations.AutomationModule.RuleQueryBuilder.Execute(List`1 actionContainers)
   at CallSite.Target(Closure , CallSite , Object , List`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.Modules.PosModule.TicketViewModel.ExecuteAutomationCommand(String automationCommandName, String automationCommandValue, String nextCommandValue, Boolean executeOnce)
   at Samba.Modules.PosModule.TicketViewModel.ExecuteAutomationCommand(AutomationCommand automationCommand, String selectedValue, String nextValue)
   at Samba.Modules.PosModule.TicketViewModel.OnExecuteAutomationCommand(CommandContainerButton obj)
   at Microsoft.Practices.Prism.Commands.DelegateCommand`1.<>c__DisplayClass6.<.ctor>b__2(Object o)
   at Microsoft.Practices.Prism.Commands.DelegateCommandBase.Execute(Object parameter)
   at Microsoft.Practices.Prism.Commands.DelegateCommandBase.System.Windows.Input.ICommand.Execute(Object parameter)
   at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Primitives.ToggleButton.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(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 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, 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.Dispatcher.Run()
   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]

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
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
DevExpress.Xpf.Core.v14.1, Version=14.1.6.0
PropertyTools, Version=2012.4.14.1

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

[System Info]

Operating System
-Microsoft Windows 7 Professional
--CodeSet = 1252
--CSDVersion = Service Pack 1
--CurrentTimeZone = -180
--FreePhysicalMemory = 1168812
--OSArchitecture = 64-bit
--OSLanguage = 1046
--ServicePackMajorVersion = 1
--ServicePackMinorVersion = 0
--Version = 6.1.7601

Machine
-SERVIDOR
--Manufacturer = LENOVO
--Model = 2522G26
--TotalPhysicalMemory = 4080709632
--UserName = SERVIDOR\Gerlando

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

Thnaks.
G.

I find this interesting, because according to older conversations, this shouldn’t happen (it’s executing the action twice and it shouldn’t)…

This is in contrast to what @emre is saying now…

Also…

What you are seeing @gerlandog is the Action executing twice, which it shouldn’t.

Something got broken.

This is something else. Send me a backup.

1 Like

here you are sir!!!
SambaPOS4_201410022122SQM.zip (4.3 MB)

Thanks!!!

G.

Mine is running just fine.