SambaPOS 5.1.60 Release

If your in beta You should follow the PMPOS thread we discuss most of this stuff there. Also you can fork the code and see it yourself.

Are you in beta? The api was released as is for experiments and testing. A lot is changing with how we are using it. Most of that discussion is in beta team atm.

well the code being sent really is just:

mutation m { executePrintJob(name: “Orders to Kitchen”, ticketId: 3740, orderStateFilters: [{stateName: “Status”, state: “New”}], nextOrderStates:[{stateName:“Status”,currentState:“New”,state:“Submitted”}]) { name } }

In the Graphiql server at localhost:9000
works pretty much 1/10 times…9/10 times its spinning forever with no error in console.

Same thing when i script is called via JS on my website.
Create Customer, Create Ticket all work perfectly though.

1 Like

Did you add + when setup messenger service

I always get error tho. “An argument with name "terminal" does not exist.” don’t know where to set that.

{
  "data": {
    "executePrintJob": null
  },
  "errors": [
    {
      "ClassName": "GraphQL.ExecutionError",
      "Message": "Error trying to resolve executePrintJob.",
      "Data": null,
      "InnerException": {
        "ClassName": "GraphQL.ExecutionError",
        "Message": "An argument with name \"terminal\" does not exist.",
        "Data": null,
        "InnerException": null,
        "HelpURL": null,
        "StackTraceString": "   at GraphQL.Types.ResolveFieldContext.Argument[TType](String name)\r\n   at Samba.Services.Graphql.Builders.AppStateBuilder.GetAppState(ResolveFieldContext context)\r\n   at Samba.Services.Graphql.Printing.PrintingMutation.PrintTicket(ResolveFieldContext arg, Int32 copies, PrintJob printJob, Nullable`1 ticketId)\r\n   at Samba.Services.Graphql.Printing.PrintingMutation.ExecutePrintJob(ResolveFieldContext arg)\r\n   at GraphQL.DocumentExecuter.<ResolveFieldAsync>d__8.MoveNext()",
        "RemoteStackTraceString": null,
        "RemoteStackIndex": 0,
        "ExceptionMethod": "8\nArgument\nGraphQL, Version=0.11.0.493, Culture=neutral, PublicKeyToken=null\nGraphQL.Types.ResolveFieldContext\nTType Argument[TType](System.String)",
        "HResult": -2146233088,
        "Source": "GraphQL",
        "WatsonBuckets": null
      },
      "HelpURL": null,
      "StackTraceString": null,
      "RemoteStackTraceString": null,
      "RemoteStackIndex": 0,
      "ExceptionMethod": null,
      "HResult": -2146233088,
      "Source": null,
      "WatsonBuckets": null
    }
  ]
}

You set that in the GQL Mutation. Show the mutation you use to invoke the Print Job.

I just test this script which digithai said it spin forever. I’m not sure if this GQL Mutation you asking?

mutation m { executePrintJob(name: "Orders to Kitchen", ticketId: 3740, orderStateFilters: [{stateName: "Status", state: "New"}], nextOrderStates:[{stateName:"Status",currentState:"New",state:"Submitted"}]) { name } }

Hmm… I know I have seen that error before and thought I had a fix for it.

@emre, I think this is a bug, either way.

@qmckay remember he is on an older version its likely .61 has fixed that. Have we tested it on the latest beta?

I’m testing on 61 (downloaded 2 days ago).

I don’t think the error is in .60 … I remember executing that mutation and it used to work, but only for certain printer Types (ie. Custom Printers like the Task Printer did not work).

The error message appears in the .61 beta, and I thought I found a workaround for it, but apparently not. I forgot to report it, but it was moot to me since in .61 Print Rules fire via Automation anyway, so I had no need for that mutation any longer.

Thank you very much for letting me know that.

It is not required for all prints but we need to enter user name, terminal name or ticket type to be able to make some custom printers work. I think I should configure them as optional parameters. It should work fine on next update.

4 Likes

i got message": "Authorization has been denied for this request when trying to access GQL

where should set Authorization? my OS WIN 10.

thank you

You have to login once first. http://192.168.1.104:9000/login
Username: Admin
Password: password

After enter it seem nothing happen but it works.

after try login, then manually back to 192.168.1.104 , because no htpp redirect ,
i got this following error again,

{
“message”: “An error has occurred.”,
“exceptionMessage”: “Value cannot be null.\r\nParameter name: source”,
“exceptionType”: “System.ArgumentNullException”,
“stackTrace”: " at System.Linq.Enumerable.SkipWhile[TSource](IEnumerable1 source, Func2 predicate)\r\n at Samba.MessagingServer.WindowsService.GraphqlController.d__3.MoveNext()\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Threading.Tasks.TaskHelpersExtensions.d__3`1.MoveNext()\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.d__0.MoveNext()\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ActionFilterResult.d__2.MoveNext()\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.AuthorizationFilterAttribute.d__2.MoveNext()\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.d__1.MoveNext()"
}

it`s seems token create only in local browser not return from server,
MoveNext()\r\n— End of stack trace from previous location where exception was thrown

Use the /login url and enter:

Username: sambapos (arbitrary)
Password: password (must be exact)

… then click Go

Then click the back button in your browser.

the error rise because query send to message server is Null, token bearer for auth is there,
here i attach screen shoot debug with firefox, it`s happen when i try to use update 5.6.1

8 posts were split to a new topic: Automation to hold orders until ready to send to kitchen

hello everyone i have few new ideas

  1. how about integrating network based caller id. www.callerid.com or google whoizcalling device. what it does it broadcasts caller id on network rather having physical modem we can have network based caller id and get the data on sambapos or multiple terminals . if we cant do that atleast we can have virtual comport mapped to that network caller id and sambapos can collect the data from that virtual genric modem.

  2. secondly have a fingerprint device to track emplyee log in and log out so employee hrs can be calculated and there wages can be calculated end of the week rather logging in and out.
    and gving acces of the till based on finger print

3 real time track of drivers based on gps google map api

4 tracking which area you are getting most of the deliveris and which area you need to focus on marketing

5 information screen showing todays yesterday or cutom date orders sale so far cash and card money taken so far labour etc etc and paied and open tickets

new simple kds layout with the button in the end of each product the it is done

All of that can be done in v5 with exception of network caller ID. And it may be possible I just haven’t looked into it. You won’t find any of that out of the box like you do with revel. You will need to configure it

4 Likes

You can already setup caller ID, have a look here

I can’t say there would be a huge number of users wanting network based caller ID as the hardware is expensive. With normal caller ID setup, you can use a USB device or a cheap USB modem.

Fingerprint readers generally require integration using custom software. It’s unlikely something you could get working with SambaPOS, however I suggest you just use RFID tags / cards with an inexpensive RFID card reader as it will do the same thing.

That’s not straightforward, because you need a way to track the drivers typically by their phone. There are third party services that offer this service, possibly you can use one then integrate something within SambaPOS.

But for delivery you can check out this

3 Likes

You can use caller id deivice on one terminal and broadcast message to others to achive similar result…
And undoubtibly use scripting to utilise ‘whoiscallingme’

3 Likes