End work period: sequence contains more than one matching element

good night, samba pos I throw the following error, I could not find the log file.

the manager of the restaurant, told me that they made some changes in the menu, while they were attending. Can the error be deviated from this?

It could be a number of things but yes it sounds like possible duplicate items.

In the log file where is that information true?

I was watching that I have to create the action for myself, I generate the log file. because apparently it is not configured

The log file requires no special configuration, it is generated automatically when errors occur.


The top-level error is not that helpful; we need to see the entire error report.


Good morning this is the error that happens on the computer

[General Info]

Application: SambaPOS
Version:     3.0.35 BETA
Region:      es
DB:          SQ
Machine:     MUSIC-PC
User:        Music
Date:        12/11/2017
Time:        03:05 a.m.

User Explanation:

Music 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.Domain.Models.Inventory.WarehouseConsumption.UpdateFinalCost(Recipe recipe)
   at System.Collections.Generic.List`1.ForEach(Action`1 action)
   at Samba.Domain.Models.Inventory.WarehouseConsumption.UpdateFinalCost(IEnumerable`1 recipes)
   at Samba.Domain.Models.Inventory.PeriodicConsumption.UpdateFinalCost(IList`1 recipes, Int32 warehouseId)
   at Samba.Presentation.Services.Implementations.InventoryModule.InventoryService.CalculateCost(PeriodicConsumption pc, WorkPeriod workPeriod)
   at Samba.Presentation.Services.Implementations.InventoryModule.InventoryService.CreateNewPeriodicConsumption(Boolean filter)
   at Samba.Presentation.Services.Implementations.InventoryModule.InventoryService.GetCurrentPeriodicConsumption()
   at Samba.Presentation.Services.Implementations.InventoryModule.InventoryService.DoWorkPeriodEnd()
   at Samba.Presentation.Services.Implementations.InventoryModule.InventoryWorkperiodProcessor.ProcessWorkPeriodEnd(WorkPeriod workPeriod)
   at Samba.Presentation.Services.Implementations.WorkPeriodModule.WorkPeriodService.StopWorkPeriod(String description)


[Assembly Info]

PresentationFramework, Version=
System.Xaml, Version=
Microsoft.Practices.Prism.MefExtensions, Version=
mscorlib, Version=
System, Version=
WindowsBase, Version=
Samba.Services, Version=
Samba.Presentation.Services, Version=
Samba.Domain, Version=
PresentationCore, Version=
Microsoft.Practices.ServiceLocation, Version=
Samba.Infrastructure, Version=
Microsoft.Practices.Prism, Version=
Samba.Presentation.Common, Version=
System.ComponentModel.Composition, Version=
Samba.Localization, Version=


[System Info]

Operating System
-Microsoft Windows 7 Ultimate
--CodeSet = 1252
--CSDVersion = Service Pack 1
--CurrentTimeZone = -420
--FreePhysicalMemory = 5499476
--OSArchitecture = 64 bits
--OSLanguage = 3082
--ServicePackMajorVersion = 1
--ServicePackMinorVersion = 0
--Version = 6.1.7601

--Manufacturer = Gigabyte Technology Co., Ltd.
--Model = B85M-DS3H-A
--TotalPhysicalMemory = 8485011456
--UserName = Music-PC\Music


######################### E N D #########################

Your running windows 7, why would you stick to version 3?
There is a seperate forum for V3 at sambapos.org but you probably wont get much responce on there as v3 is getting very old.
v4 is even getting on having had no updates for over a year or so and even v5 has now stopped getting updates with v6 now in production…
V3 is like running windows 98 today…

Either way you wont get much more support here than on v3 forum as probably 99% of people on this forum have never even touched v3…

1 Like

Good luck getting help with that obsolete version. :wink:

The error indicates a problem with calculating and updating Inventory Consumption and Costs, which happens when the Workperiod is ended.

Consumption (and Cost) are calculated by referencing Products sold, and the related Recipes for those Products.

Check your Products, Inventory Items, and Inventory Recipes to verify there are no duplicates.

The person in charge of the restaurant told me that he had added new products to the menu, he told me that he had not added any of these products to recipes, and these changes were made while the restaurant was in operation.

Thanks for your comments, they are very helpful

Understand that the Menu is not the same thing as the Products. The items in the Menu are not relevant. The Menu is simply a visual mapping of your Products to the POS screen, and you can have multiple Menu items which refer to the same Product. Adding Menu Items would not create this issue.

On the other hand, adding Products (duplicates) will certainly cause problems.

You still need to check your Products, where duplicates are NOT allowed, but could occur in older versions due to missing duplicate-checking, or could occur in ANY version via other “outside” Database manipulation.

However, my guess still leans toward the Inventory section: Items, Recipes, and Transactions.

1 Like

Could this be the problem?

Can this be the table that has this data?

Hard to say. That looks like an Inventory Group Code that that has the same name as an Inventory Item.

That should not cause an issue, but with v3, I can’t say for sure.

There are two computers and in a different one the products

Might just be me but those two don’t look to be running from central database with different product lists (guessing v3 could do multi terminal!)
What are you trying to show with those screenshots?

1 Like

The problem was that they added other dishes to the products, if I eliminate them, can I close the day?

No idea, never really used inventory in v4 or v5 yet alone v3.
Try it. What’s worst that could happen? Still not be able to do end of day?

1 Like

I still do not erase anything.

But first of all, how is the normal process to add a new product?

I think that there is something missing.

As previously said your using an outdated version that most here have never used.
Perhaps there is a bug allowing duplicates somewhere - no idea.

I closed the day from the database and it worked

And now I did a test mark some products I returned to make the closure and it worked perfect