SambaPOS 4.1.62 Released [Important Read inside]

I’ll be a little busy for next two days so I might not respond some issues immediately. Don’t forget backups and you can safely downgrade to 4.1.61 if you notice an issue.

Hello. Sorry for that brief explanation. Tomorrow I’ll fly back at home and I’ll write more detailed explanation especially for custom reports.

###Custom keyboard for rule queries.

We’ve recently implemented numeric keyboard for query dialogs. On this release you’ll be able to configure a custom keyboard set if your setting contains N flag. For query settings after flags section add one more section to configure custom keyboard. Default setting is 49,50,51|52,53,54|55,56,57|8,48,13. Pipe splits rows and these numbers are ascii key codes of keys. Use 0 for blank buttons.

###Pivot Tables

Use a ! symbol before table name to convert a custom report table to a pivot table.

This is a sample template.

[!Tickets:2,2,2,3, 2, 2, 2, 2]
>Number|Date|Time|Table|Discount|[C]Cash|[C]Credit Card|[C]Amount
{REPORT TICKET DETAILS:T.TicketNumber,T.Date,T.Time,EN.Table,CA.Discount,PA.Cash,PA.Credit Card,TN.TotalAmount:(DE=Restaurant) AND (TY=Ticket)}

For pivot tables we need to know if a value is Currency, Number or string. [C] section on Cash, Credit Card and Amount headers defines these columns as currencies. Use N for quantities.

####Abbreviations

You’ll notice we’re using some abbreviations such as EN, CA. Here is a list of them.

EN: Entity Name
EC: Entity Custom Field
TS: Ticket State
TT: Ticket Tag
CA: Calculation
PA: Payment
T.x A ticket database value named as x. For example. T.TotalAmount is TotalAmount field value. As TotalAmount is a numeric value we can use TN instead of T to format it better.

###New Custom Report Tags

{REPORT ORDER DETAILS:X}
{REPORT ORDER COUNT:X}
{REPORT ORDER TOTAL:X}
{REPORT PAYMENT DETAILS:X}
{REPORT PAYMENT COUNT:X}
{REPORT PAYMENT TOTAL:X}
{REPORT CALCULATION DETAILS:X}
{REPORT CALCULATION COUNT:X}
{REPORT CALCULATION TOTAL:X}
{REPORT TICKET DETAILS:X}
{REPORT TICKET TOTAL:X}
{REPORT TICKET PAYMENT TOTAL:X}
{REPORT TICKET CALCULATION TOTAL:X}
{REPORT TICKET COUNT:X}

X is <expression> for Totals and Counts. <fields>:<expression> for Detail tags. Expression syntax is (<Field>=<Value>) or (<Field>.<SubField>=<Value>). In our sample template (DE=Restaurant) means we’ll list tickets where department name is restaurant or (TS.Status=Paid) returns paid tickets. I’ve listed fields on previous section. Here is a list of expression abbreviations.

EN Ticket.Entity Name Equals
ENC Ticket.Entity Name Contains
EC Ticket.Custom Field Equals
ECC Ticket.Custom Field Contains
TU Ticket.User
DE Ticket.Department
TE Ticket.Terminal
TY Ticket.TicketType
PA Ticket.Payment
CA Ticket.Calculation
TT Ticket.Ticket Tag
TS Ticket.Ticket State
OT Order.Order Tag
OS Order.Order State
OU Order.User
MT Order.MenuItem.Custom Tag
MG Order.MenuItem.Group
PT Payment.Payment Type
CT Calculation.Calculation Type

###Activation Warnings

SambaPOS will display warnings if there are modules that needs activation.

###Other Fixes

This release also contains fixes for some reported issues.

5 Likes

Already having fun with it. Made my custom keyboard!

55,56,57|52,53,54|49,50,51|48,46,13

I was not expecting this… Great feature! @emre

Diving into pivot tables now those are fun!

2 Likes

@kendash,
Can you please explain how to set custom keyboard?

Just add ; and your ascii codes at end of your expression.

have you got the decimal point working? on mine it doesnt do anything when pressed, emre says it should work on next update, something to do with languages, also another user says the $ and % doesnt work

@emre they are right… it inserts the decimal key but it will not work. Physical decimal key on physical keypad does work. Carriage return does work.

Changing 46 to 190 works. It shows as 3/4 key but it places the decimal. Like @emre said just use this until next update.

New sample template Custom report works great but when I change it to pivot He does not show any data. Does anyone know what is the reason?

You have to drag and drop your data where you want it. And you have to make sure it was formatted correctly per his instructions or it will not show right.

Sorry I do not understand
Can you give an example \ screenshots??
:blush:


1 Like

… also don’t forget to right click + save to keep your setup.

1 Like

LOL I was wondering how to do that.

1 Like

Dear @Emre, I am facing one small problem…

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

Application: SambaPOS
Version:     4.1.63
Region:      en
DB:          SQ
Machine:     SERVIDOR
User:        Gerlando
Date:        02/10/2014
Time:        22:13

User Explanation:

Gerlando said ""
-----------------------------

[Exception Info 1]

Top-level Exception
Type:        System.ArgumentException
Message:     Input string was not in a correct format.Couldn't store <-> in Desconto Column.  Expected type is Decimal.
Source:      System.Data
Stack Trace: at System.Data.DataColumn.set_Item(Int32 record, Object value)
   at System.Data.DataTable.NewRecordFromArray(Object[] value)
   at System.Data.DataRowCollection.Add(Object[] values)
   at Samba.Addon.CustomReports.CustomReportTable.GetDataTable()
   at Samba.Addon.CustomReports.CustomReportBuilder.Build(SimpleReport sp)
   at Samba.Addon.CustomReports.CustomReportViewerViewModel.CreateCustomReport(String reportName, SimpleReport simpleReport, Boolean addHeader)
   at Samba.Addon.CustomReports.CustomReportViewerViewModel.GetReport()
   at Samba.Presentation.Common.Reports.AbstractReport.<RefreshReport>b__2()
   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.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.FormatException
Message:     Input string was not in a correct format.
Source:      mscorlib
Stack Trace: at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseDecimal(String value, NumberStyles options, NumberFormatInfo numfmt)
   at System.Convert.ToDecimal(String value, IFormatProvider provider)
   at System.String.System.IConvertible.ToDecimal(IFormatProvider provider)
   at System.Data.Common.DecimalStorage.Set(Int32 record, Object value)
   at System.Data.DataColumn.set_Item(Int32 record, Object value)

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

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

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

[System Info]

Operating System
-Microsoft Windows 7 Professional
--CodeSet = 1252
--CSDVersion = Service Pack 1
--CurrentTimeZone = -180
--FreePhysicalMemory = 1500972
--OSArchitecture = 64-bit
--OSLanguage = 1046
--ServicePackMajorVersion = 1
--ServicePackMinorVersion = 0
--Version = 6.1.7601

Machine
-SERVIDOR
--Manufacturer = LENOVO
--Model = 2522G26
--TotalPhysicalMemory = 4080709632
--UserName = SERVIDOR\Gerlando

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

what i did was slightly modify your example…

[!Tickets:2,2,2,2,2, 2, 2, 2]
>Number|Date|Mesa|Garçon|Pessoas|[C]Desconto|[C]Taxa|[C]Total
{REPORT TICKET DETAILS:T.TicketNumber,T.Date,EN.Tables Pizzaria,TT.Garçon Pizzaria,TT.Pessoas,CA.Desconto,CA.Taxa Serviço,TN.TotalAmount}

Now… I take the [C] out from the Desconto and Taxa and all seems to work…

Thanks!!!

G.