# Another error while accessing accounts screen

**URL:** <https://forum.sambapos.com/t/another-error-while-accessing-accounts-screen/6333>\
**Category:** V4 Issue\
**Created:** [July 23, 2015, 8:47pm UTC](https://forum.sambapos.com/t/another-error-while-accessing-accounts-screen/6333 "2015-07-23T20:47:55Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![ab0udamd](https://forum.sambapos.com/user_avatar/forum.sambapos.com/ab0udamd/32/11275_2.png) [@ab0udamd](https://forum.sambapos.com/u/ab0udamd)\
**Post date:** [July 23, 2015, 8:47pm UTC](https://forum.sambapos.com/t/another-error-while-accessing-accounts-screen/6333/1 "2015-07-23T20:47:55Z")

</div>

* * *

[General Info]

Application: SambaPOS  
Version: 4.1.82  
Region: en  
DB: SQ  
Machine: CUISINACLIENT  
User: Cuisina  
Date: 7/23/2015  
Time: 8:47 PM

User Explanation:

## Cuisina said “”

[Exception Info 1]

Top-level Exception  
Type: System.InvalidOperationException  
Message: Sequence contains no matching element  
Source: System.Core  
Stack Trace: at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)  
at Samba.Services.Implementations.CacheService.GetCurrencySymbol(Int32 currencyId)  
at Samba.Services.Implementations.AccountModule.AccountRowBuilder.\<\>c\_\_DisplayClass12.b\_\_2(KeyValuePair`2 x) at System.Collections.Generic.List`1.ForEach(Action`1 action) at Samba.Services.Implementations.AccountModule.AccountRowBuilder.GetAccountScreenRows(AccountScreen accountScreen, WorkPeriod currentWorkPeriod) at Samba.Services.Implementations.AccountModule.AccountService.GetAccountScreenRows(AccountScreen accountScreen, WorkPeriod currentWorkPeriod) at Samba.Modules.AccountModule.AccountSelectorViewModel.UpdateAccountScreen(AccountScreen accountScreen) at Samba.Modules.AccountModule.AccountSelectorViewModel.Refresh() at Samba.Modules.AccountModule.AccountModule.OnNavigate(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.v14.1, Version=14.1.6.0  
DevExpress.Xpf.Grid.v14.1.Core, Version=14.1.6.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  
DevExpress.Xpf.Core.v14.1, Version=14.1.6.0  
EntityFramework, Version=4.4.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  
Microsoft.Practices.ServiceLocation, Version=1.0.0.0  
Samba.Persistance, Version=1.0.0.0  
Microsoft.Practices.Prism.MefExtensions, Version=4.0.0.0  
PropertyTools, Version=2012.4.14.1

* * *

[System Info]

Operating System  
-Microsoft Windows 8.1 Pro  
–CodeSet = 1252  
–CSDVersion =  
–CurrentTimeZone = 240  
–FreePhysicalMemory = 2139180  
–OSArchitecture = 64-bit  
–OSLanguage = 1033  
–ServicePackMajorVersion = 0  
–ServicePackMinorVersion = 0  
–Version = 6.3.9600

Machine  
-CUISINACLIENT  
–Manufacturer = Hewlett-Packard  
–Model = HP Compaq 8200 Elite SFF PC  
–TotalPhysicalMemory = 4177526784  
–UserName = CuisinaClient\CUISINACLIENT\Cuisina

* * *

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [July 23, 2015, 8:55pm UTC](https://forum.sambapos.com/t/another-error-while-accessing-accounts-screen/6333/2 "2015-07-23T20:55:07Z")

</div>

Likely caused by the same reason that Emre mentioned in your other Topic on the matter.

The message indicates there is a problem with your Accounts and/or Transaction Types. It cannot find an account.

Be sure you have not deleted any accounts. If you did delete an account, then recreate it, and remap the Transaction Type, Document Type, and the associated Entity (if any).

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [July 23, 2015, 9:07pm UTC](https://forum.sambapos.com/t/another-error-while-accessing-accounts-screen/6333/3 "2015-07-23T21:07:20Z")

</div>

What I’ve understood is you configured a foreign currency, made transactions with that foreign currency and deleted it. Looks like you are experimenting some settings. If you clear transactions that will work fine.

For next version I’ve added a validation code to prevent that.

---

<div class="post-metadata">

**Author:** ![ab0udamd](https://forum.sambapos.com/user_avatar/forum.sambapos.com/ab0udamd/32/11275_2.png) [@ab0udamd](https://forum.sambapos.com/u/ab0udamd)\
**Post date:** [July 24, 2015, 3:45pm UTC](https://forum.sambapos.com/t/another-error-while-accessing-accounts-screen/6333/4 "2015-07-24T15:45:45Z")

</div>

You mean I clear transactions for that account?

---

<div class="post-metadata">

**Author:** ![ab0udamd](https://forum.sambapos.com/user_avatar/forum.sambapos.com/ab0udamd/32/11275_2.png) [@ab0udamd](https://forum.sambapos.com/u/ab0udamd)\
**Post date:** [July 24, 2015, 3:47pm UTC](https://forum.sambapos.com/t/another-error-while-accessing-accounts-screen/6333/5 "2015-07-24T15:47:03Z")

</div>

You mean I clear transactions for that account?  
How, exactly? hah

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [July 24, 2015, 4:07pm UTC](https://forum.sambapos.com/t/another-error-while-accessing-accounts-screen/6333/6 "2015-07-24T16:07:11Z")

</div>

> [@ab0udamd](#):
>
> You mean I clear transactions for that account?

No I mean clearing all transactions (tickets, account transactions, etc.) You’re working on experimental database right? It is not a good idea to delete currencies from production database.

> [@ab0udamd](#):
>
> How, exactly? hah

You can find dozens of topics if you search. For example you can follow the first topic of that tutorial.

> [@Configuring Menus on First Install](http://forum.sambapos.com/t/configuring-menus-on-first-install/892):
>
> When you install SambaPOS it generates some demo data for you so you can test SambaPOS. To clear demo data and create your products follow these steps. ###Clear transactions If you own DatabaseTools module you can simply execute Clear Database Transactions task to clear all tickets. If you don’t see Clear Database Transactions task in the list click Create Default Tasks button. If you don’t have DatabaseTools module follow this topic to clear transactions. ###Clear Menu Click P…

---

<div class="post-metadata">

**Author:** ![ab0udamd](https://forum.sambapos.com/user_avatar/forum.sambapos.com/ab0udamd/32/11275_2.png) [@ab0udamd](https://forum.sambapos.com/u/ab0udamd)\
**Post date:** [July 24, 2015, 4:26pm UTC](https://forum.sambapos.com/t/another-error-while-accessing-accounts-screen/6333/7 "2015-07-24T16:26:07Z")

</div>

I am actually, working on my main database… anywhere I can using SQL Database Manager 2014 and change something there?

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [July 24, 2015, 4:43pm UTC](https://forum.sambapos.com/t/another-error-while-accessing-accounts-screen/6333/8 "2015-07-24T16:43:43Z")

</div>

So you need to review recent account transactions and correct ones that contains reference to removed accounts or currencies. Management \> Accounts \> Transactions…

---

<div class="post-metadata">

**Author:** ![ab0udamd](https://forum.sambapos.com/user_avatar/forum.sambapos.com/ab0udamd/32/11275_2.png) [@ab0udamd](https://forum.sambapos.com/u/ab0udamd)\
**Post date:** [July 24, 2015, 9:29pm UTC](https://forum.sambapos.com/t/another-error-while-accessing-accounts-screen/6333/9 "2015-07-24T21:29:31Z")

</div>

I have over 2000 transactions, any other way?

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [July 24, 2015, 10:19pm UTC](https://forum.sambapos.com/t/another-error-while-accessing-accounts-screen/6333/10 "2015-07-24T22:19:28Z")

</div>

You don’t need to start from beginning. If you deleted a currency two days before you can review only these transactions.

---

<div class="post-metadata">

**Author:** ![ab0udamd](https://forum.sambapos.com/user_avatar/forum.sambapos.com/ab0udamd/32/11275_2.png) [@ab0udamd](https://forum.sambapos.com/u/ab0udamd)\
**Post date:** [July 25, 2015, 2:04pm UTC](https://forum.sambapos.com/t/another-error-while-accessing-accounts-screen/6333/11 "2015-07-25T14:04:39Z")

</div>

I forgot when I did that actually

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [July 25, 2015, 2:40pm UTC](https://forum.sambapos.com/t/another-error-while-accessing-accounts-screen/6333/12 "2015-07-25T14:40:44Z")

</div>

So seems like you don’t want to cooperate with us. Please let me know clearly what you want me to do for you.

---

<div class="post-metadata">

**Author:** ![ab0udamd](https://forum.sambapos.com/user_avatar/forum.sambapos.com/ab0udamd/32/11275_2.png) [@ab0udamd](https://forum.sambapos.com/u/ab0udamd)\
**Post date:** [July 25, 2015, 5:23pm UTC](https://forum.sambapos.com/t/another-error-while-accessing-accounts-screen/6333/13 "2015-07-25T17:23:05Z")

</div>

No I’m serious, I want to cooperate with you, I’m just saying what is going on, I don’t want you to do anything for me, I just need help, I changed the currency and I don’t remember when, and accounts screen is crashing, as you can see, I just want to know if it’s possible to change anything from the SQL database? because I can’t search in 2000+ transactions.  
Maybe in future versions we can search for all transactions made by a certain user and delete anything of it?

---

<div class="post-metadata">

**Author:** ![Jesse](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jesse/32/61493_2.png) [@Jesse](https://forum.sambapos.com/u/Jesse)\
**Post date:** [July 25, 2015, 7:29pm UTC](https://forum.sambapos.com/t/another-error-while-accessing-accounts-screen/6333/14 "2015-07-25T19:29:51Z")

</div>

> [@ab0udamd](#):
>
> I just want to know if it’s possible to change anything from the SQL database? because I can’t search in 2000+ transactions.Maybe in future versions we can search for all transactions made by a certain user and delete anything of it?

Yes you can but you would still have to search through 2000+ transactions to fix anything if you dont remember when you did it. What do you expect to be able to do in the database? There is no magic wand for the damage you did. Your going to have to find the transactions and fix them or just erase it all and start over.

> [@ab0udamd](#):
>
> Maybe in future versions we can search for all transactions made by a certain user and delete anything of it?

That is not a practical feature for a real world situation. Typically you dont delete transactions. In fact this idea would open up for serious internal fraud issues.

---

<div class="post-metadata">

**Author:** ![ab0udamd](https://forum.sambapos.com/user_avatar/forum.sambapos.com/ab0udamd/32/11275_2.png) [@ab0udamd](https://forum.sambapos.com/u/ab0udamd)\
**Post date:** [July 25, 2015, 7:41pm UTC](https://forum.sambapos.com/t/another-error-while-accessing-accounts-screen/6333/15 "2015-07-25T19:41:34Z")

</div>

There would be a field in the database showing my customer name, and the currency that the POS can’t find, I can change that currency back to the default one and it’ll work.  
Transaction should have a connection to a certain customer or something I can look for

---

<div class="post-metadata">

**Author:** ![ab0udamd](https://forum.sambapos.com/user_avatar/forum.sambapos.com/ab0udamd/32/11275_2.png) [@ab0udamd](https://forum.sambapos.com/u/ab0udamd)\
**Post date:** [July 25, 2015, 7:47pm UTC](https://forum.sambapos.com/t/another-error-while-accessing-accounts-screen/6333/16 "2015-07-25T19:47:04Z")

</div>

I can’t delete the customer’s account because it’s used by a “Ticket” how can I delete the account? to be able to delete the customer entity

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [July 25, 2015, 9:26pm UTC](https://forum.sambapos.com/t/another-error-while-accessing-accounts-screen/6333/17 "2015-07-25T21:26:49Z")

</div>

IF you don’t use foreign currencies at all you can open SambaPOS database with a SQL tool and execute these scripts one by one. Please take backups before doing anything… and **be sure you are not using any Foreign Currency.**

```
Update Accounts set ForeignCurrencyId = 0
Update AccountTransactionValues set Exchange = Debit-Credit 
Update AccountTransactions set ExchangeRate = 1

```

That will mute the error but what you’re not convincing to is… you made transactions with that currency (we don’t know how many) so your transaction amounts should also reviewed and fixed accordingly because what we’re doing by running these SQL Scripts will convert all currency related data to default currency. As a result your account balances may not balance correctly. If you won’t review them I’ll strongly recommend to clear all transactions and start from beginning.

I hope that helps.

> [@ab0udamd](#):
>
> I can’t delete the customer’s account because it’s used by a “Ticket” how can I delete the account? to be able to delete the customer entity

I’ve noticed you still want to delete stuff, lol. On a financial application you should never delete your records because you’re generating reports, trusting these numbers and make future decisions based on that data. When you delete part of data in the future your past reports changes. We don’t allow that for many reasons. At least this is how SambaPOS works.

---

<div class="post-metadata">

**Author:** ![ab0udamd](https://forum.sambapos.com/user_avatar/forum.sambapos.com/ab0udamd/32/11275_2.png) [@ab0udamd](https://forum.sambapos.com/u/ab0udamd)\
**Post date:** [July 26, 2015, 10:47am UTC](https://forum.sambapos.com/t/another-error-while-accessing-accounts-screen/6333/18 "2015-07-26T10:47:21Z")

</div>

Indeed, thank you for understanding
