[Solved] Unable to end work period - sequence contains more than one matching element

I cannot end my work period. I get ‘There is a problem, Sequence contains more than matching element’ This is my last error log i think:

Application: SambaPOS
Version:     5.1.55
Region:      en
DB:          SQ
Machine:     BIGEASY
User:        Big Easy
Date:        12/18/2015
Time:        5:03 PM

User Explanation:

Big Easy said ""
-----------------------------

[Exception Info 1]

Top-level Exception
Type:        System.InvalidOperationException
Message:     Sequence contains more than one matching element
Source:      System.Core
Stack Trace: at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
   at Samba.Presentation.Services.Implementations.InventoryModule.SaleReader.GetSaleTransactions(List`1 orders)
   at Samba.Presentation.Services.Implementations.InventoryModule.SaleReader.Read(IEnumerable`1 tickets)
   at Samba.Presentation.Services.Implementations.InventoryModule.ConsumptionBuilder.GetSales(IEnumerable`1 tickets, Int32 warehouseId)
   at Samba.Presentation.Services.Implementations.InventoryModule.ConsumptionBuilder.UpdateConsumption(PeriodicConsumption pc, Int32 warehouseId, IEnumerable`1 tickets, IList`1 recipes)
   at Samba.Presentation.Services.Implementations.InventoryModule.ConsumptionBuilder.BuildPeriodicConsumption()
   at Samba.Presentation.Services.Implementations.InventoryModule.InventoryService.DoWorkPeriodEnd()
   at Samba.Presentation.Services.Implementations.InventoryModule.InventoryWorkperiodProcessor.ProcessWorkPeriodEnd(WorkPeriod workPeriod)
   at Samba.Presentation.Services.Implementations.WorkPeriodModule.WorkperiodClient.StopWorkPeriod(String description)

Today we started to use a second terminal, not sure if that has something to do with the problem.

Thanks for any help

Chris

Show the entire error please.

I have uploaded screen shots of the error and the log as a zip file.

log.zip (16.1 KB)

Thanks

I also get the error when entering warehouse from the main menu, and this closes down samba with the error message:

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

Application: SambaPOS
Version:     5.1.55
Region:      en
DB:          SQ
Machine:     BIGEASY
User:        Big Easy
Date:        12/19/2015
Time:        8:08 AM

User Explanation:

Big Easy said ""
-----------------------------

[Exception Info 1]

Top-level Exception
Type:        System.InvalidOperationException
Message:     Sequence contains more than one matching element
Source:      System.Core
Stack Trace: at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
   at Samba.Presentation.Services.Implementations.InventoryModule.SaleReader.GetSaleTransactions(List`1 orders)
   at Samba.Presentation.Services.Implementations.InventoryModule.SaleReader.Read(IEnumerable`1 tickets)
   at Samba.Presentation.Services.Implementations.InventoryModule.RecipeFinder.FindRequiredRecipesFromSales(WorkPeriod workPeriod)
   at Samba.Presentation.Services.Implementations.InventoryModule.InventoryService.GetRequiredRecipesForSales(WorkPeriod workPeriod)
   at Samba.Modules.InventoryModule.InventoryModule.OnNavigate(String parameterName)
   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.StylusLogic.PromoteMainToMouse(StagingAreaInputItem stagingItem)
   at System.Windows.Input.StylusLogic.PromoteMainUpToTouch(StylusDevice stylusDevice, StagingAreaInputItem stagingItem)
   at System.Windows.Input.StylusLogic.PromoteMainToTouch(ProcessInputEventArgs e, StylusEventArgs stylusEventArgs)
   at System.Windows.Input.StylusLogic.PromoteMainToOther(ProcessInputEventArgs e)
   at System.Windows.Input.StylusLogic.PostProcessInput(Object sender, ProcessInputEventArgs e)
   at System.Windows.Input.InputManager.RaiseProcessInputEventHandlers(ProcessInputEventHandler postProcessInput, ProcessInputEventArgs processInputEventArgs)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.StylusLogic.InputManagerProcessInput(Object oInput)
   at System.Windows.Input.StylusLogic.PreProcessInput(Object sender, PreProcessInputEventArgs e)
   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 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 Enterprise
--CodeSet = 1252
--CSDVersion = 
--CurrentTimeZone = 420
--FreePhysicalMemory = 4073488
--OSArchitecture = 64-bit
--OSLanguage = 1033
--ServicePackMajorVersion = 0
--ServicePackMinorVersion = 0
--Version = 10.0.10240

Machine
-BIGEASY
--Manufacturer = ASUSTeK COMPUTER INC.
--Model = S451LN
--TotalPhysicalMemory = 6320054272
--UserName = BIGEASY\Big Easy

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

Any help would be great, as the pos is currently down in the restaurant and we are working on paper!!!

Thanks

What rules do you have relating to ending work period?
I had similar error when using [?Prompt] where I made the flow loop back if one of the values was left empty, although it was different rules because it was the same sequence it counted as duplicate [?prompt] elements].

I don’t have any rules set up aside from the default ones.

But it might not be an issue anymore. I attempted to restore the database to a manual backup I had made earlier today. It failed part way through and corrupted the database!!
And I then realised that the auto backups had not been working as I hadn’t changed the backup directory from user/documents/…, which windows doesn’t allow the backup to save.
So I have had to revert to an old version that I had losing all my recent data!

So for now the old version is working, I’ll see how I get on. Lesson definitely learned, always backup!

Thanks

Hi,

Same issue again tonight, error when either try to end work period or access inventory page. full log attached.
log 21-12-15.zip (19.6 KB)
Please help!!!

Thanks

Someone else looks to be having similar problem;

Emres responce to them;

I would hazzard a guess you have a similar issue.
Sorry I cannot offer much advice as have never used the inventory side of samba.
@emre would be the person to comment on if these issues are related.

If you can create a backup and PM me the zip file I can test if latest update fixes that.

Ok I’ll get it to you tomorrow. I’m not at the restaurant anymore. Thanks!

Hi Emre and Chris Im Maria from Mexico and I have the same issue. can you help please?
Error log file for details
and the message: Sequence contains more than one matching element

thank you so much!

You need to post the full error output from the Details Tab of the error dialog.

done. thanks for your guidance. Im not good in Systems

That’s not what he asked. We need to see the error log.

How do I do that… sorry

I can give you the team viewer if it helps… Im new on systems

I also got an error on the warehouse as Chris did. I fixed the recepie and then the ware house and the end work period is working fine… thanks anyway.
Have a great day!

2 Likes

Hi Maria, I have a problem very similar to yours

I had a récipe that was uploaded twice so I deleted one and problema solved

1 Like

This sorted out my issue… thanks.