Loyalty Card, Samba Crash

Dunno whats wrong…

Action

Rule

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

Application: SambaPOS
Version:     5.1.59
Region:      en
DB:          SQ
Machine:     DESKTOP-0174DOV
User:        Shakes
Date:        19/05/2016
Time:        14:47

User Explanation:

Shakes said ""
-----------------------------

[Exception Info 1]

Top-level Exception
Type:        System.NullReferenceException
Message:     Object reference not set to an instance of an object.
Source:      Samba.Domain
Stack Trace: at Samba.Domain.Models.Accounts.AccountTransaction.Create(AccountTransactionType template, DateTime date)
   at Samba.Domain.Models.Accounts.AccountTransactionDocument.AddNewTransaction(AccountTransactionType template, IEnumerable`1 accountDataList, Decimal amount, Decimal exchangeRate)
   at Samba.Domain.Models.Tickets.Ticket.AddPayment(PaymentType paymentType, Account account, Decimal amount, Decimal tenderedAmount, Decimal exchangeRate, Int32 userId, Int32 departmentId, Int32 terminalId, String description)
   at Samba.Presentation.Services.Implementations.TicketModule.TicketService.AddPayment(Ticket ticket, PaymentType paymentType, Account account, Decimal amount, Decimal tenderedAmount, String description)
   at Samba.Modules.PaymentModule.PaymentEditor.UpdateTicketPayment(PaymentType paymentType, ChangePaymentType changeTemplate, Account paymentAccount, Decimal paymentDueAmount, Decimal paidAmount, Decimal tenderedAmount, String description)
   at Samba.Modules.PaymentModule.PaymentEditorViewModel.SubmitPaymentAmount(PaymentType paymentType, ChangePaymentType changeTemplate, Account paymentAccount, Decimal paymentDueAmount, Decimal tenderedAmount, String description)
   at Samba.Modules.PaymentModule.PaymentEditorViewModel.SubmitPayment(PaymentType paymentType)
   at Samba.Modules.PaymentModule.PaymentEditorViewModel.OnMakePayment(PaymentType paymentType)
   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 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, 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.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]

mscorlib, Version=4.0.0.0
DevExpress.Xpf.LayoutControl.v14.1, Version=14.1.11.0
System.Xml, Version=4.0.0.0
DevExpress.Xpf.Grid.v14.1, Version=14.1.11.0
System, Version=4.0.0.0
DevExpress.Xpf.Grid.v14.1.Core, Version=14.1.11.0
WindowsBase, Version=4.0.0.0
System.Xaml, Version=4.0.0.0
Samba.Domain, Version=1.0.0.0
System.Core, Version=4.0.0.0
PresentationFramework, Version=4.0.0.0
Samba.Infrastructure, Version=1.0.0.0
Microsoft.Practices.Prism, Version=4.0.0.0
System.Runtime.Serialization, Version=4.0.0.0
Microsoft.Practices.Prism.MefExtensions, Version=4.0.0.0
System.ComponentModel.Composition, Version=4.0.0.0
PresentationCore, Version=4.0.0.0
DevExpress.Xpf.Core.v14.1, Version=14.1.11.0
Samba.Services, Version=1.0.0.0
Samba.Presentation.Services, Version=1.0.0.0
System.Windows.Forms, Version=4.0.0.0
System.Drawing, Version=4.0.0.0
Stateless, Version=1.0.0.0
Samba.Persistance, Version=1.0.0.0
PropertyTools, Version=2012.4.14.1
Samba.Localization, Version=1.0.0.0
ReachFramework, Version=4.0.0.0
Samba.Infrastructure.Data, Version=1.0.0.0
EntityFramework, Version=6.0.0.0
FluentValidation, Version=3.4.0.0
Omu.ValueInjecter, Version=2.3.0.0
Microsoft.Practices.ServiceLocation, Version=1.0.0.0
Microsoft.CSharp, Version=4.0.0.0

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

[System Info]

Operating System
-Microsoft Windows 10 Pro
--CodeSet = 1252
--CSDVersion = 
--CurrentTimeZone = 60
--FreePhysicalMemory = 561640
--OSArchitecture = 64-bit
--OSLanguage = 2057
--ServicePackMajorVersion = 0
--ServicePackMinorVersion = 0
--Version = 10.0.10586

Machine
-DESKTOP-0174DOV
--Manufacturer = TOSHIBA
--Model = Satellite C650D
--TotalPhysicalMemory = 4021178368
--UserName = DESKTOP-0174DOV\Shakes

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

It doesnt like your Transaction Type. Show your Transaction Type Template. More importantly explain what your doing.

I’m trying to add 10% back onto a top up card with every purchase with that card used.

I cant show documents yet till this afternoon as I’m not at work but will do. Have a couple weeks to get this going flawlessly anyway.

Matt

Ok I fixed that, I hadn’t set it up right for some reason. I didn’t even fill in the dropdown options.

Ive just tested it out and spent £1, but it took away an additional £0.10 rather than add it back on…
So I must need to add a minus or positive somewhere?
Here maybe? [=TN('{TICKET TOTAL}') * 5/100]

Matt

Try -5/100

Might work :grinning:

1 Like

That did it! Thanks buddy :slight_smile:

Were all set now, just gotta wait for some awesome ShakesCard designs to come in from our competition.

Thanks

1 Like

Just to add, let say I only wanted this loyalty to work on Milkshakes and Smoothies, then I add the constraints above for that to work…?

Execute Rule if Matches Any

{MenuItemGroupCode} Matches Milkshakes
{MenuItemGroupCode} Matches Smoothies

?

Yep i think that should work :grinning:

it don’t lol.

Just to clarify to myself is this the correct option for Menu Categories… and secondly is it Matches or Equals that I will need?

That will not work in a Payment Processed Rule. It has no idea what Order you are referring to because Payment is Ticket-level.

And no, those are not valid tags. Look at Printer Template Help… what you want is {GROUP CODE}

2 Likes

Makes sense, so how would I go about making the till only fire a payment processed rule if only those 2 Group Codes were added?

I only want 10% loyalty for Milkshakes and Smoothies, not food or anything else.

To be fair it probably doesn’t matter because i rarely sell anything else, I’m probably just having my stubborn business head on… If i asked the wife she would probably tell me not to be such a penny scraping old man haha

Matt

Infact on second thoughts I’ve decided not to be such a scrimp

Matt

You would need to use one of these Events to be able to constrain on Order-level:

Order Added to Ticket
Order State Updated

1 Like