Reopening Settle ticket - Assisitance please

Hi Team,

I need some help!!!, this is probably simple. Always struggled with Automation :anguished:

I have two departments:

Restaurant
Take Away (Custom Package Delivery)

I would like implement Re-open Settled Ticket and Cancel Settled payment for the Take Away department. I have implemented following tutorial. However, Iā€™m struggling to implement Re-open settled and Cancel Settled ticket for Takeaway Department.

Always your support is appreciated.

Did you tried executing Update Ticket's Delivery Status action (while canceling payment) to change Delivery status back to Waiting?

Thank you Emre . This is what I have tried, and it seem to be working. Iā€™ll carry out additional test

Added the Update Ticketā€™s Delivery Status action to Rule Cancel Settled payment

Added filter - DepartmentId is 2 so that only Delivery ticket (Take away department) are displayed otherwise Ticket from Restaurant Department also appears when Tickets are re-opened /Cancel Settled payment are selected.

I have observed following behaviour:

  1. After opening a Settled ticket
  2. Select Re-open Settled Ticket
  3. Select Cancel Settled payment
  4. Add any new product then close the ticket
  5. if you then try to move the ticket to different table. Sambapos will crash with below error log and it will shut down. Need to restart again.


Below crash/error log when tiring to move the ticket to table 2


[General Info]

Application: SambaPOS
Version: 5.1.58
Region: en
DB: SQ
Machine: NABAB-PC
User: Main
Date: 3/13/2016
Time: 1:25 AM

User Explanation:


[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 MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext 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.InvalidOperationException
Message: Sequence contains no matching element
Source: System.Core
Stack Trace: at System.Linq.Enumerable.Single[TSource](IEnumerable1 source, Func2 predicate)
at Samba.Domain.Models.Tickets.Ticket.UpdateEntity(Int32 entityTypeId, Int32 entityId, String entityName, Int32 accountTypeId, Int32 accountId, String entityCustomData, String notes)
at Samba.Presentation.Services.Implementations.TicketModule.TicketService.UpdateEntity(Ticket ticket, Entity entity, Int32 accountTypeId, Int32 accountId, String entityCustomData)
at Samba.Presentation.Services.Implementations.TicketModule.TicketService.UpdateEntity(Ticket ticket, Entity entity)
at Samba.Modules.PosModule.PosViewModel.OnEntitySelectedForTicket(EventParameters1 eventParameters) at Microsoft.Practices.Prism.Events.EventSubscription1.InvokeAction(Action1 action, TPayload argument) at Microsoft.Practices.Prism.Events.EventSubscription1.<>c__DisplayClass2.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]

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 = 0
ā€“FreePhysicalMemory = 5325980
ā€“OSArchitecture = 64-bit
ā€“OSLanguage = 1033
ā€“ServicePackMajorVersion = 0
ā€“ServicePackMinorVersion = 0
ā€“Version = 10.0.10586

That seems to relates with calculation templates but canā€™t spot exact caseā€¦ Does it happens for all tickets or tickets that contains a discount or some other calculation?

yes, it happens for all tickets without any discount or any other calculation.

can you zip and PM me your database backup?

sure Iā€™ll send it shortly.

This is not valid Constraint syntax ā€¦

Without looking at the Delivery Tutorial, it should be something like:

'{TICKET STATE:DeliveryStatus}' == 'Paid'

When you settle a ticket we remove 0 amount account transactions but when you reopen them auto round calculation templates remains inside ticket without related account transactions. That would work without issues on next release. Until that you can either temporarily disable auto rounding or reopening settled tickets or donā€™t move reopened tickets :slight_smile:

2 Likes

Thanks, Iā€™ll use the temporarily workarounds until next release.