Auto Merge Tables

Is there a way to automatically merge tables?

I have the same issue as here Adding tickets to tables in that I don’t want to have to merge tickets on a table.

Primarily, because sambapos crashes everytime!! NO idea why.

I’m about to train staff on the new system this afternoon. We are a pub / restaurant. Most customers aren’t on a table.

Typically when someone orders extra drinks for their table, they will ask for the drinks and then give the table number last (when they realise the bar staff are waiting for payment from them). When this happens, we will end up with two tickets that I can’t merge.

It’s great to say, yes, ask for the table first- which is what we will do, but being unable to merge is a tad weird.

Can we see the error message? :slight_smile:

Good Point :smile:

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

Application: SambaPOS
Version:     4.1.34 BETA
Region:      en
DB:          SQ
Machine:     SID-PC
User:        Sid
Date:        25/05/2014
Time:        13:06

User Explanation:

Sid said ""
-----------------------------

[Exception Info 1]

Top-level Exception
Type:        System.InvalidOperationException
Message:     Sequence contains no elements
Source:      System.Core
Stack Trace: at System.Linq.Enumerable.Last[TSource](IEnumerable`1 source)
   at Samba.Services.Implementations.PrinterModule.ValueChangers.FunctionRegistry.<RegisterFunctions>b__d(Ticket x, String d)
   at Samba.Services.Implementations.PrinterModule.ValueChangers.FunctionData`1.<>c__DisplayClass1.<GetResult>b__0()
   at Samba.Services.Implementations.PrinterModule.ValueChangers.Helper.FormatData(String data, String tag, Func`1 valueFunc)
   at Samba.Services.Implementations.PrinterModule.ValueChangers.FunctionData`1.GetResult(T model, String currentData, PrinterTemplate template)
   at Samba.Services.Implementations.PrinterModule.ValueChangers.FunctionRegistry.<>c__DisplayClassef`1.<ExecuteFunctions>b__ee(String current, FunctionData`1 func)
   at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)
   at Samba.Services.Implementations.PrinterModule.ValueChangers.FunctionRegistry.ExecuteFunctions[TModel](String content, TModel model, PrinterTemplate printerTemplate)
   at Samba.Services.Implementations.PrinterModule.PrinterService.ExecuteFunctions[T](String printerTemplate, T model)
   at Samba.Services.Implementations.AutomationModule.Preprocessor.ProcessModelData[T](String data, Object dataObject)
   at Samba.Services.Implementations.AutomationModule.Preprocessor.ReplaceModelData(String data, Object dataObject)
   at Samba.Services.Implementations.AutomationModule.Preprocessor.Process(String input, Object dataObject)
   at Samba.Services.Implementations.AutomationModule.ActionDataBuilder.PreprocessWith(Object dataObject)
   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.CloseTicket(Ticket ticket)
   at Samba.Presentation.Services.Implementations.TicketModule.TicketService.<MergeTickets>b__23(Ticket x)
   at System.Collections.Generic.List`1.ForEach(Action`1 action)
   at Samba.Presentation.Services.Implementations.TicketModule.TicketService.MergeTickets(IEnumerable`1 ticketIds)
   at Samba.Modules.PosModule.TicketListViewModel.OnMergeTickets(String 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.v13.2, Version=13.2.8.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
DevExpress.Xpf.Grid.v13.2.Core, Version=13.2.8.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.v13.2, Version=13.2.8.0
PropertyTools, Version=2012.4.14.1

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

[System Info]

Operating System
-Microsoft Windows 8.1
--CodeSet = 1252
--CSDVersion = 
--CurrentTimeZone = 60
--FreePhysicalMemory = 3406136
--OSArchitecture = 64-bit
--OSLanguage = 2057
--ServicePackMajorVersion = 0
--ServicePackMinorVersion = 0
--Version = 6.3.9600

Machine
-SID-PC
--Manufacturer = Acer
--Model = Aspire XC-603
--TotalPhysicalMemory = 8472616960
--UserName = sid-pc\SID-PC\Sid

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

OK. I saw that error submission in logs. It happens when an automatic printing executes after merge. If you’ve used {USER NAME} tag in your templates removing it temporarily will solve the problem until next update.

I’ve removed the tag - it was in the kitchen printer receipt and the customer receipt.

Still get same error

Can you PM me a zip file of your database backup?

I’ve solved that issue, but when I merge the tickets, I get this https://www.dropbox.com/s/uqpjb3ed1jl25cv/Screenshot%202014-05-25%2014.58.13.png - the original 2 tickets are not closing.

The original issue was down to a rule I have to allow users to jump on and off the till. I will pm you the db

I can’t reproduce the error message so I’m not sure what is the reason of the issue.

however you’ve added Total Amount > 0 constraint in ticket payment check rule so it keeps merged tickets open since they are empty.

Was there ever an answer to auto merge?
I would like to setup so only ever one ticket per table.
As said always asking table number gets arround it but not ideal - would prefer automatically merging/adding of new orders to open ticket already on table.