[Solved] Report Cannot View Report sequence contains more than one matching element

Cannot View Report sequence contains more than one matching element

[General Info]

Application: SambaPOS
Version:     4.1.82
Region:      en
DB:          SQ
Machine:     ECI-PC
User:        eci
Date:        2/9/2015
Time:        9:53 AM

User Explanation:

eci 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.Accounts.AccountTransactionDocument.UpdateSingletonTransactionAmount(Int32 transactionTypeId, String transactionName, Decimal amount, Decimal exchangeRate, IEnumerable`1 accountDataList)
   at Samba.Domain.Models.Tickets.Calculation.UpdateCalculationTransaction(AccountTransactionDocument document, Decimal amount, Decimal exchangeRate, IEnumerable`1 accountDataList)
   at Samba.Domain.Models.Tickets.Ticket.CalculateServices(IEnumerable`1 calculations, Decimal sum)
   at Samba.Domain.Models.Tickets.Ticket.GetPreTaxServicesTotal()
   at Samba.Modules.BasicReports.Reports.EndOfDayReport.EndDayAbstractReportViewModel.<CreateTicketTypeInfo>b__a9(Ticket y) in c:\Users\Emre\Documents\GitHub\SambaPOS-Gold\Samba.Modules.BasicReports\Reports\EndOfDayReport\EndDayReportViewModel.cs:line 449
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.Sum(IEnumerable`1 source)
   at Samba.Modules.BasicReports.Reports.EndOfDayReport.EndDayAbstractReportViewModel.<CreateTicketTypeInfo>b__a8(IGrouping`2 x) in c:\Users\Emre\Documents\GitHub\SambaPOS-Gold\Samba.Modules.BasicReports\Reports\EndOfDayReport\EndDayReportViewModel.cs:line 445
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Samba.Modules.BasicReports.Reports.EndOfDayReport.EndDayAbstractReportViewModel.CreateTicketTypeInfo(SimpleReport report, IEnumerable`1 tickets, String header) in c:\Users\Emre\Documents\GitHub\SambaPOS-Gold\Samba.Modules.BasicReports\Reports\EndOfDayReport\EndDayReportViewModel.cs:line 443
   at Samba.Modules.BasicReports.Reports.EndOfDayReport.EndDayAbstractReportViewModel.GetReport() in c:\Users\Emre\Documents\GitHub\SambaPOS-Gold\Samba.Modules.BasicReports\Reports\EndOfDayReport\EndDayReportViewModel.cs:line 59
   at Samba.Presentation.Common.Reports.AbstractReport.<RefreshReport>b__2()


[Assembly Info]

Samba.Services, Version=
mscorlib, Version=
System, Version=
Microsoft.Practices.Prism, Version=
WindowsBase, Version=
Samba.Infrastructure, Version=
Samba.Infrastructure.Data, Version=
PresentationFramework, Version=
System.Xaml, Version=
Samba.Presentation.Services, Version=
FluentValidation, Version=
Samba.Domain, Version=
DevExpress.Xpf.Grid.v14.1, Version=
DevExpress.Xpf.Grid.v14.1.Core, Version=
PresentationCore, Version=
Stateless, Version=
System.Core, Version=
System.Drawing, Version=
DevExpress.Xpf.Core.v14.1, Version=
EntityFramework, Version=
System.Windows.Forms, Version=
System.ComponentModel.Composition, Version=
Samba.Localization, Version=
Microsoft.CSharp, Version=
Microsoft.Practices.ServiceLocation, Version=
Samba.Persistance, Version=
Microsoft.Practices.Prism.MefExtensions, Version=
PropertyTools, Version=2012.4.14.1


[System Info]

Operating System
-Microsoft Windows 7 Ultimate
--CodeSet = 1252
--CSDVersion = Service Pack 1
--CurrentTimeZone = 420
--FreePhysicalMemory = 1441684
--OSArchitecture = 32-bit
--OSLanguage = 1033
--ServicePackMajorVersion = 1
--ServicePackMinorVersion = 0
--Version = 6.1.7601

--Manufacturer = System manufacturer
--Model = System Product Name
--TotalPhysicalMemory = 3623084032
--UserName = eci-PC\eci


please help

Did you try to define a currency?

No Currency defined…

Can you please post screenshots of all calculation templates you’ve configured?

this is the database admin 2302

Thank You

OK. I don’t have V4 installed atm. I’ll check that when I’ll get back at home.

PS: Please don’t post databases publicly and do it with PM when staff requested. Thanks.

Oh ok …sorry and thank you for your help…

Production databases may contain sensitive info about the business or licenses. That’s why we request backups via PM.

btw. I can remember we solved an issue related with that error that can happen when two different terminals tries to settle same ticket at the same time. You’re using 4.1.82 and that’s fine but do you remember when did you updated to 4.1.82?

I straight install ver 4.1.82 and import the database .from other PC
Ah… i remember when we are testing a tablet order , one tablet try to settle same ticket which already been settled by the other tablet .
is there anyway to fix this ? We need to see/print 02/08/2015 sales report

You can quickly review Accounts > Transactions that generated for tickets created at 02/08/2015. Transaction raises that error will contain multiple calculation transactions of same type (eg double discount lines or service). After finding that transaction delete one of these duplicate lines and report will work fine.

However 4.1.82 should handle that multiple tablet issue. Please be sure all terminals updated to 4.1.82 version and please let me know if same issue occurs again.

1 Like

found ticket number 6093 with paid status but zero amount , is it possible this ticket cause the problem ? how to delete this ticket ?

Try adding an order to that ticket and then settle it again. Then go back and void the order.

@kendash i try adding an order to that ticket and then settle it again then void the order , its not fixing the problem . still cannot generate 02/08/2015 report ,

Doubt that was it then. Do what emre said.

Did you checked accounts > transactions?
There should be a transaction document that have double calculation transactions.

i’ve checked workperiod 02/08/2015 transactions.
i use two calculation transactions ,discount and service charge
i could not find any double calculation transactions except discount and service charge .
Emre , if you could check my database i would be very grateful

I’ve checked your transactions and found 6259 has multiple service transactions.

Delete highlighted one and it will work fine.


its solved … thank a million Emre !!!.

1 Like

Hi Emre …
this issue occurs again .several times…
I hv 2 terminal adn 4 tablets and all terminal using ver 4.1.82

Are both terminals sharing same database… which terminal is the tablets connecting too?