Error Message on Generating Report for Specific Day

Hi Guys,

I have been running Samba for the past 4-6 months and it has been rock solid.
Have had 2 issues in the past 2 days consecutively.

I got a Error Message on Friday and the ticket locked and kept crashing whenever I opened it. I solved this by restoring the database to the previous work period backup via Database Tools and manually re-entering all the transactions.

On Saturday night, now I’m having a issue with generating Sales Report for Saturday and November. This time the system does not crash but displays a error message when trying to generate the report.

The error message is as follows:

[General Info]

Application: SambaPOS
Version:     4.1.60
Region:      en
DB:          SQ
Machine:     SERVER-PC
User:        ipad1
Date:        23/11/2014
Time:        8:08 AM

User Explanation:

ipad1 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)
   at Samba.Domain.Models.Tickets.Calculation.UpdateCalculationTransaction(AccountTransactionDocument document, Decimal amount, Decimal exchangeRate)
   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.<>c__DisplayClass8.<RefreshReport>b__2(Object param0, DoWorkEventArgs param1)
   at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)


[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=
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=
DevExpress.Xpf.Core.v14.1, Version=
PropertyTools, Version=2012.4.14.1


Database tools was not even functioning and just crashed when I clicked it on the Manage Menu.
Have since upgraded the base software from .60 to .78 and Database Tools work, however the report generation error still persists.

Any help rendered would be greatly helpful.
If anyone needs the first error message on Friday or the database backup, I will post it up as well.


Something odd in that error report.

I’m at a total lost haha.

Seriously any help would be great.

OK it is a known issue that happens when you configure a new calculation type but did not created a specific account transaction type for that calculation type. I mean if you create Tip Calculation Type you should create and set Tip Transaction Type as the account transaction type. For example if you use Discount Transaction Type instead of creating a new transaction type for Tip Calculation you’ll receive that error if you have a ticket that both have tip and discount.

New releases checks for this configuration issue and won’t let you to make such selection but old releases didn’t have that validation.

First of all you should find that calculation type. After correcting it you should check created account transaction documents (Accounts > Transactions) for Saturday and find the transaction document that contains that calculation transaction. Fixing transaction type will solve that problem.

PS: Thank you very much for the backup but I’m not able to check that atm.


thanks a million emre :smile:

will follow your instructions and try and find out what went wrong and solve this

1 Like