# Error and close sambapos

**URL:** <https://forum.sambapos.com/t/error-and-close-sambapos/3540>\
**Category:** V4 Issue\
**Created:** [December 2, 2014, 5:24pm UTC](https://forum.sambapos.com/t/error-and-close-sambapos/3540 "2014-12-02T17:24:46Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonathanbalim](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/j/58956e/32.png) [@jonathanbalim](https://forum.sambapos.com/u/jonathanbalim)\
**Post date:** [December 2, 2014, 5:24pm UTC](https://forum.sambapos.com/t/error-and-close-sambapos/3540/1 "2014-12-02T17:24:47Z")

</div>

I run into this error

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

Application: SambaPOS
Version: 4.1.76
Region: en
DB: CE
Machine: SEIKO-POS
User: seiko
Date: 12/2/2014
Time: 5:20 PM

User Explanation:

seiko said ""
-----------------------------

[Exception Info 1]

Top-level Exception
Type: System.Reflection.TargetInvocationException
Message: Exception has been thrown by the target of an invocation.
Source: mscorlib
Stack Trace: at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   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.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(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.DispatcherOperation.Wait(TimeSpan timeout)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherOperation operation, CancellationToken cancellationToken, TimeSpan timeout)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at Samba.Presentation.Services.Common.ExtensionMethods.PublishEvent[TEventsubject](TEventsubject eventArgs, String eventTopic, Boolean wait)
   at Samba.Presentation.Common.Services.ApplicationState.<NotifyEvent>b__9(ActionData x)
   at Samba.Services.Implementations.AutomationModule.ActionDataBuilder.InvokeFor(Action`1 dataAction)
   at CallSite.Target(Closure , CallSite , Object , Action`1 )
   at Samba.Services.Implementations.AutomationModule.RuleExecutor.ExecuteWith(Object dataParameter, Action`1 dataAction)
   at Samba.Services.Implementations.AutomationModule.NotificationService.NotifyEvent(String eventName, Object dataParameter, Int32 terminalId, Int32 departmentId, Int32 userRoleId, Int32 ticketTypeId, Action`1 dataAction)
   at Samba.Presentation.Common.Services.ApplicationState.NotifyEvent(String eventName, Object dataObject)
   at Samba.Modules.PosModule.TicketViewModel.ExecuteAutomationCommand(String automationCommandName, String automationCommandValue, String nextCommandValue, Boolean executeOnce, Boolean clearSelection)
   at Samba.Modules.PosModule.TicketViewModel.ExecuteAutomationCommand(AutomationCommand automationCommand, String selectedValue, String nextValue)
   at Samba.Modules.PosModule.TicketViewModel.OnExecuteAutomationCommand(CommandContainerButton 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.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 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()

Inner Exception 1
Type: System.Reflection.TargetInvocationException
Message: Exception has been thrown by the target of an invocation.
Source: mscorlib
Stack Trace: at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   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.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(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.DispatcherOperation.Wait(TimeSpan timeout)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherOperation operation, CancellationToken cancellationToken, TimeSpan timeout)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at Samba.Presentation.Services.Common.ExtensionMethods.PublishEvent[TEventsubject](TEventsubject eventArgs, String eventTopic, Boolean wait)
   at Samba.Presentation.Common.Services.ApplicationState.<NotifyEvent>b__9(ActionData x)
   at Samba.Services.Implementations.AutomationModule.ActionDataBuilder.InvokeFor(Action`1 dataAction)
   at CallSite.Target(Closure , CallSite , Object , Action`1 )
   at Samba.Services.Implementations.AutomationModule.RuleExecutor.ExecuteWith(Object dataParameter, Action`1 dataAction)
   at Samba.Services.Implementations.AutomationModule.NotificationService.NotifyEvent(String eventName, Object dataParameter, Int32 terminalId, Int32 departmentId, Int32 userRoleId, Int32 ticketTypeId, Action`1 dataAction)
   at Samba.Presentation.Common.Services.ApplicationState.NotifyEvent(String eventName, Object dataObject)
   at Samba.Presentation.Services.Implementations.EntityModule.EntityServiceClient.UpdateEntityState(Int32 entityId, Int32 entityTypeId, String stateName, String state, String quantityExp, Entity entity)
   at Samba.Modules.EntityModule.ActionProcessors.UpdateEntityState.Process(ActionData actionData)
   at Samba.Services.Common.RuleActionTypeRegistry.ProcessAction(String actionType, ActionData actionData)
   at Samba.Services.Implementations.AutomationModule.AutomationService.ProcessAction(String actionType, ActionData actionData)
   at Samba.Modules.AutomationModule.AutomationModule.<OnInitialization>b__4(EventParameters`1 x)
   at Microsoft.Practices.Prism.Events.EventSubscription`1.InvokeAction(Action`1 action, TPayload argument)
   at Microsoft.Practices.Prism.Events.EventSubscription`1.<>c __DisplayClass2.<GetExecutionStrategy>b__ 0(Object[] arguments)
   at Microsoft.Practices.Prism.Events.EventBase.InternalPublish(Object[] arguments)
   at Microsoft.Practices.Prism.Events.CompositePresentationEvent`1.Publish(TPayload payload)
   at Samba.Presentation.Services.Common.ExtensionMethods.Publish[TEventsubject](TEventsubject eventArgs, String eventTopic, Action expectedAction)

Inner Exception 2
Type: System.Data.Entity.Infrastructure.DbUpdateException
Message: An error occurred while updating the entries. See the inner exception for details.
Source: EntityFramework
Stack Trace: at System.Data.Entity.Internal.InternalContext.SaveChanges()
   at System.Data.Entity.Internal.LazyInternalContext.SaveChanges()
   at System.Data.Entity.DbContext.SaveChanges()
   at Samba.Infrastructure.Data.SqlData.EFWorkspace.CommitChanges()
   at Samba.Persistance.Implementations.EntityDao.LogEntityState(String name, Int32 entityId, String stateName, String startState, DateTime startStateDate, String endState, DateTime endStateDate, String customData)
   at Samba.Addon.CustomReports.ActionProcessors.LogEntityState.Log(ActionData actionData)
   at Samba.Addon.CustomReports.ActionProcessors.LogEntityState.Process(ActionData actionData)
   at Samba.Services.Common.RuleActionTypeRegistry.ProcessAction(String actionType, ActionData actionData)
   at Samba.Services.Implementations.AutomationModule.AutomationService.ProcessAction(String actionType, ActionData actionData)
   at Samba.Modules.AutomationModule.AutomationModule.<OnInitialization>b__4(EventParameters`1 x)
   at Microsoft.Practices.Prism.Events.EventSubscription`1.InvokeAction(Action`1 action, TPayload argument)
   at Microsoft.Practices.Prism.Events.EventSubscription`1.<>c __DisplayClass2.<GetExecutionStrategy>b__ 0(Object[] arguments)
   at Microsoft.Practices.Prism.Events.EventBase.InternalPublish(Object[] arguments)
   at Microsoft.Practices.Prism.Events.CompositePresentationEvent`1.Publish(TPayload payload)
   at Samba.Presentation.Services.Common.ExtensionMethods.Publish[TEventsubject](TEventsubject eventArgs, String eventTopic, Action expectedAction)

Inner Exception 3
Type: System.Data.UpdateException
Message: An error occurred while updating the entries. See the inner exception for details.
Source: System.Data.Entity
Stack Trace: at System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter)
   at System.Data.EntityClient.EntityAdapter.Update(IEntityStateManager entityCache)
   at System.Data.Objects.ObjectContext.SaveChanges(SaveOptions options)
   at System.Data.Entity.Internal.InternalContext.SaveChanges()

Inner Exception 4
Type: System.Data.SqlServerCe.SqlCeException
Message: An overflow occurred while converting to datetime.
Source: SQL Server Compact ADO.NET Data Provider
Stack Trace: at System.Data.SqlServerCe.SqlCeCommand.ProcessResults(Int32 hr)
   at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommandText(IntPtr& pCursor, Boolean& isBaseTableCursor)
   at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommand(CommandBehavior behavior, String method, ResultSetOptions options)
   at System.Data.SqlServerCe.SqlCeCommand.ExecuteNonQuery()
   at System.Data.SqlServerCe.SqlCeMultiCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.SqlServerCe.SqlCeMultiCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.Mapping.Update.Internal.DynamicUpdateCommand.Execute(UpdateTranslator translator, EntityConnection connection, Dictionary`2 identifierValues, List`1 generatedValues)
   at System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter)

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

[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
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
--CodeSet = 1252
--CSDVersion = 
--CurrentTimeZone = -300
--FreePhysicalMemory = 2564396
--OSArchitecture = 64-bit
--OSLanguage = 1033
--ServicePackMajorVersion = 0
--ServicePackMinorVersion = 0
--Version = 6.3.9600

Machine
-SEIKO-POS
--Manufacturer = LENOVO
--Model = 10160
--TotalPhysicalMemory = 4179738624
--UserName = Seiko-POS\SEIKO-POS\seiko

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

```

Can someone explain it to me what need to be done?

---

<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:** [December 2, 2014, 5:28pm UTC](https://forum.sambapos.com/t/error-and-close-sambapos/3540/2 "2014-12-02T17:28:26Z")

</div>

> [@jonathanbalim](#):
>
> Inner Exception 3  
> Type: System.Data.UpdateException  
> Message: An error occurred while updating the entries. See the inner exception for details.  
> Source: System.Data.Entity  
> Stack Trace: at System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter)  
> at System.Data.EntityClient. **Entity** Adapter.Update(IEntityStateManager entityCache)  
> at System.Data.Objects.ObjectContext.SaveChanges(SaveOptions options)  
> at System.Data.Entity.Internal.InternalContext.SaveChanges()
> 
> Inner Exception 4  
> Type: System.Data.SqlServerCe.SqlCeException  
> Message: **An overflow occurred while converting to datetime.**  
> Source: SQL Server Compact [ADO.NET](http://ADO.NET) Data Provider

Something in your Entity Data is failing to convert to DateTime due to a value being out of range (overflow). Show some screenshots of your Entity setup.

```
Manage > Entities > Entity Types
Manage > Entities > (Customer and/or Table) > General
Manage > Entities > (Customer and/or Table) > Notes
Manage > Entities > Entity Screens

```

When does the error occur? What have you done recently to your setup that might be attributed to this error?

---

<div class="post-metadata">

**Author:** ![jonathanbalim](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/j/58956e/32.png) [@jonathanbalim](https://forum.sambapos.com/u/jonathanbalim)\
**Post date:** [December 2, 2014, 5:31pm UTC](https://forum.sambapos.com/t/error-and-close-sambapos/3540/3 "2014-12-02T17:31:54Z")

</div>

which one that you want me to take a screenshot from?

---

<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:** [December 2, 2014, 5:37pm UTC](https://forum.sambapos.com/t/error-and-close-sambapos/3540/4 "2014-12-02T17:37:12Z")

</div>

Show some screenshots of your Entity setup.

```
Manage > Entities > Entity Types
Manage > Entities > (Customer and/or Table) > General
Manage > Entities > (Customer and/or Table) > Notes
Manage > Entities > Entity Screens

```

When does the error occur? What have you done recently to your setup that might be attributed to this error?

---

<div class="post-metadata">

**Author:** ![jonathanbalim](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/j/58956e/32.png) [@jonathanbalim](https://forum.sambapos.com/u/jonathanbalim)\
**Post date:** [December 2, 2014, 5:47pm UTC](https://forum.sambapos.com/t/error-and-close-sambapos/3540/5 "2014-12-02T17:47:45Z")

</div>

![](https://forum.sambapos.com/uploads/default/original/3X/c/a/ca36df471cc772ef5946451c3f8f7d08c93d8b11.png)  
 ![](https://forum.sambapos.com/uploads/default/original/3X/a/4/a42e483080ca86614f8524bc41fb9a50f81dd498.png)

 ![](https://forum.sambapos.com/uploads/default/original/3X/2/8/286d20b1557ff890a72b7b9f230d534e29d6b6d4.png)  
 ![](https://forum.sambapos.com/uploads/default/original/3X/e/3/e320fcfeaa2c28e9e25139712642534faacd5439.png)

---

<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:** [December 2, 2014, 5:57pm UTC](https://forum.sambapos.com/t/error-and-close-sambapos/3540/6 "2014-12-02T17:57:24Z")

</div>

Ok, so when do you see the error occur? The error message indicates that it is upon Saving Entity (State) Data.

It it with a specific Entity Type (Customers, Tables, Delivery/Takeout, Employees)?  
Or is it with any Entity Type?

If it is a specific Entity Type, show screens of that Entity Type.

Have you done anything with `Manage > Settings > States`?

Have you added/removed/modified any `Actions` or `Rules` in `Manage > Automation`?

---

<div class="post-metadata">

**Author:** ![jonathanbalim](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/j/58956e/32.png) [@jonathanbalim](https://forum.sambapos.com/u/jonathanbalim)\
**Post date:** [December 2, 2014, 6:09pm UTC](https://forum.sambapos.com/t/error-and-close-sambapos/3540/7 "2014-12-02T18:09:49Z")

</div>

I try to put an order as takeout and somehow i saw that error. I did not change anything at all.

Also, how come the {ORDER TAG PRICE} wont show up on my receipt?

---

<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:** [December 2, 2014, 6:23pm UTC](https://forum.sambapos.com/t/error-and-close-sambapos/3540/8 "2014-12-02T18:23:40Z")

</div>

Let us see some screenshots of that Entity Type then.

For Receipt printing, you’ll want to copy/paste your `Printer Template` here so we can determine the issue regarding `{ORDER TAG PRICE}`.

---

<div class="post-metadata">

**Author:** ![jonathanbalim](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/j/58956e/32.png) [@jonathanbalim](https://forum.sambapos.com/u/jonathanbalim)\
**Post date:** [December 2, 2014, 6:33pm UTC](https://forum.sambapos.com/t/error-and-close-sambapos/3540/9 "2014-12-02T18:33:11Z")

</div>

![](https://forum.sambapos.com/uploads/default/original/3X/9/f/9fc0945d34665e334ccc6e019b5407cb522c5b75.png)

 ![](https://forum.sambapos.com/uploads/default/original/3X/1/2/12647958f678eafa76aedb6977956ac24028d2d9.png) 

Here is the printer template

```
<L00>Date:{TICKET DATE}
<L00>Time:{TIME}
<L00>Ticket No:{TICKET NO}
<F>-
{ENTITIES}
<F>-
{ORDERS}
<F>=
<EB>
{DISCOUNTS}
[<J10>Total Gift:|{ORDER STATE TOTAL:Gift}]
{SERVICES}
<J9>Subtotal:|{PLAIN TOTAL}
<J9>Tax 8%:|{TAX TOTAL}
<J10>Total:|{TICKET TOTAL}
{PAYMENTS}
<DB>
<C10>Thank you for dining with us!
<C10>Please come again!

<F>=
<J9>Suggested tip Amount|15%:[=F(TN('{TICKET TOTAL}') * TN('15') / TN('100'))]
<J9>Are Provided for your|18%:[=F(TN('{TICKET TOTAL}') * TN('18') / TN('100'))]
<J9>Convenience.|20%:[=F(TN('{TICKET TOTAL}') * TN('20') / TN('100'))]
<F>=
[DISCOUNTS]
<J00>{CALCULATION NAME} %{CALCULATION AMOUNT}|{CALCULATION TOTAL}

[SERVICES]
<J00>{CALCULATION NAME}|{CALCULATION TOTAL}

[PAYMENTS]
<J00>{PAYMENT NAME}|{PAYMENT AMOUNT}

[ORDERS]
-- Default format for orders
<J10>{QUANTITY} {NAME}:|{TOTAL PRICE}
{ORDER TAGS}

[ORDERS:Gift]
-- Format for gifted orders
<J00>- {QUANTITY} {NAME}| **GIFT**
{ORDER TAGS}

[ORDERS:Void]
-- Nothing will print for void lines

[ORDER TAGS]
-- Format for order tags
<J00> * {ORDER TAG NAME} | {ORDER TAG PRICE}

[ENTITIES:Table]
-- Table entity format
<L00>Table: {ENTITY NAME}

[ENTITIES:Customer]
-- Customer entity format
<EB>
<J10>Customer: {ENTITY NAME} | {ENTITY DATA:Phone} 
<J10>{ENTITY DATA:Address}
<DB>
[ENTITIES:Delivery/Take Out]
-- Delivery/Take Out entity format
<EB>
<J00>Delivery/Take Out: {ENTITY NAME} | {ENTITY DATA:Phone}
<DB>
```

---

<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:** [December 2, 2014, 6:45pm UTC](https://forum.sambapos.com/t/error-and-close-sambapos/3540/10 "2014-12-02T18:45:41Z")

</div>

Maybe try upgrading to v4.1.81

You might also try replacing the `/` character with something else, like dash `-` or space or dot `.`

Youre Printer Template looks fine to me, I can only guess that it is not printing `{ORDER TAG PRICE}` because the Order Tag in question has no price.

---

<div class="post-metadata">

**Author:** ![jonathanbalim](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/j/58956e/32.png) [@jonathanbalim](https://forum.sambapos.com/u/jonathanbalim)\
**Post date:** [December 2, 2014, 6:55pm UTC](https://forum.sambapos.com/t/error-and-close-sambapos/3540/11 "2014-12-02T18:55:39Z")

</div>

I use free tagging

 ![](https://forum.sambapos.com/uploads/default/original/3X/a/3/a36c732e2eaf1a23bcf3a285a4e4ccd4672e34c5.png)

once i hit + it will show on the pos but when i print it, it wont show up.

---

<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:** [December 2, 2014, 8:39pm UTC](https://forum.sambapos.com/t/error-and-close-sambapos/3540/12 "2014-12-02T20:39:14Z")

</div>

```
Persistance.Implementations.EntityDao.LogEntityState

```

Seems like `Log Entity State` action works with an invalid date. As it triggered with a command button click inside ticket that seems like a rule constraint issue.

@jonathanbalim did you tried implementing time clock?

---

<div class="post-metadata">

**Author:** ![jonathanbalim](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/j/58956e/32.png) [@jonathanbalim](https://forum.sambapos.com/u/jonathanbalim)\
**Post date:** [December 3, 2014, 12:27am UTC](https://forum.sambapos.com/t/error-and-close-sambapos/3540/13 "2014-12-03T00:27:42Z")

</div>

I did try implementing a time-clock for the employees. I have a custom report for it as well. At first I have the widget for it and all I do is removing the widget but thats all I didn’t change any rules or actions.

---

<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:** [December 3, 2014, 3:05am UTC](https://forum.sambapos.com/t/error-and-close-sambapos/3540/14 "2014-12-03T03:05:45Z")

</div>

Please check your rule configuration. Probably `Log Entity State` action also works for entities other than Employees or a ticket command somehow triggers entity state logging.

You can start by adding a message box action inside Time Clock logging rule to understand which ticket function executes time clock logging.
