SambaPOS 5.3.6 Release

If I could download the 5.3.0 I would also show you that it works flawlessly. I updated all PC’s in our restaurant from 5.3.0 to 5.3.6 and the waiter screen stopped working. After some troubleshooting I found out that the script does not work so I uninstalled Samba and returned to 5.3.0. It started working again.
The thing is that I won’t be in the kitchen at least till Saturday, I don’t have the 5.3.0 file and the download does not work :frowning:

then its not useful for us it should be take ordered

1 Like

@KryptonFactor has sent me an 5.3.0 installation file (thank you) so I can show you that it works in the older version.

As you can see, the script returns the Name as it should and it also makes a new entry to the database:

Of course it also works from the entity screen - when the cook marks an order as finished, it disappears from the kitchen screen and a new task appears on the waiter screen. It is not the case with 5.3.4 and later though :confused:

Could you please look into it?

Thank you, Ondra

That script uses addTask gql query, maybe it changed, you can see it by using gql ui helper thru your browser

thank you. How can I find out whether addTask query has changed? I’m sorry but I don’t know what “gql ui helper thru your browser” is and forum search did not help.

Any help would be much appreciated. Thank you

This post goes into detail how to configure everything:

https://forum.sambapos.com/t/integrators-graphql-api-guide/14047

We didnt change addTask mutation. But i will control this script.

Thank you very much. I tried simplifying the script as most of the code is not used in my case but it just does not work in releases after 5.3.0.

I’m also thinking about using the Add Task action instead of this script. Could it solve my issue? I would still need to use the getTaskbyIdentifier function though, but this one seems to work.

I wrote a new script to duplicate a task to become a waiter task:

function addWaiterTask(ident){

	var resp = gqlEXEC(getTask('Kitchen Task', ident));	
	
	resp = JSON.parse(resp);
	
	var task = resp.data!=null ? resp.data.task : null;
	
	var name = task.name;
	
	var customdata = task.customData;
	
	var content = customdata[1].value;
	
	//return addTask('Waiter Task',name,false,'','Waiter',content,'NULL', ident);
	
	gqlEXEC(addTask('Waiter Task',name,false,'','Waiter',content,'NULL', ident));

}

function getTask(taskType, ident) {
    var q = '';
        q+= '{task:getTask(';
        q+= 'taskType:"'+taskType+'"';
        q+= 'identifier:"'+ident+'"';
        q+= ')';
        q+= '{id,isCompleted,identifier,name,state,content,contentText,customData{name,value},stateLog{state,start,end},stateDuration{state,duration},startDate,endDate,userName}';
        q+= '}';
    return q;
};

function addTask(taskType,taskName,isCompleted,customData,userName,content,state,taskIdent) {
    var q = '';
        q+= 'mutation m{';
            q+= 'addTask(';
            q+= 'task:{';
            q+= 'taskType:"'+taskType+'"';
            q+= ',name:"'+taskName+'"';
            q+= ',isCompleted:'+isCompleted;
            q += ',identifier:"'+taskIdent+'"';
            q+= ',userName:"'+userName+'"';
            q+= typeof(content)==='undefined' ? '' : ',content:' + '"'+content+'"';
            q+= typeof(state)==='undefined' ? '' : ',state:' + '"'+state+'"';
            q+= ',customData:[';
            if (customData) {
                for (var d=0; d<customData.length; d++) {
                    q+= (d==0 ? '' : ',');
                    q+= '{name:"'+customData[d].name+'",value:"'+customData[d].value+'"}';
                }
            }
            q+= ']';
            q+= '}';
            q+= ')';
            q+= '{id,name,identifier,content,isCompleted,userName,customData{name,value}}';
        
        q+= '}';
    return q;
};


function gqlEXEC(query, callback) {
	//return query;
    var data = gql.Exec(query);
    var dobj = JSON.parse(data);
    return data;
   };

Works well in 5.3.0, does not work in 5.3.6. I believe there has to be an issue with the addTask mutation.

Icons from login and main screen disappeared and replaced with squares after upgrading to 5.3.6 for Sambapos installed on Windows 7

However, Icons are fine without any problem on windows 10

Any Idea how to fix it? for aesthetic reasons mainly.

Thank you in advance.

Yes you need to install the segoui font. It should prompt for that.

1 Like

Run the installer again and make sure you say yes at the very end where it asks if you want to replace the Segoe UI font. The version of Segoe UI font that comes with some versions of Windows is a cut down version and doesn’t include all the symbols.

1 Like

Nevermind, I made a few changes in the setup and sacrificed some features to be able to use the Add Task action, which works.

I believe there is a bug in 5.3.2 and newer releases which breaks down the AddTask mutation. Has anyone of you had a similar issue?

Are you using task printer to create the original task?

Yes. Task printer to create a Kitchen task, script to duplicate it as Waiter task.

Inspired by a tutorial from this forum.

Does it matter? While troubleshooting I tried using the addtask mutation to create a simple task. No success in 5.3.6.

You can always just duplicate the task printer automation. Clone it all make a few changes you want.

Ok but how does the task printer automation know what task I’m talking about? The print task action is fired once a ticket is closed and it creates a task for each new kitchen item.

When the cook marks one of the items as finished, it fires a rule to duplicate this single task and make it a waiter task. Is this doable with the task printer automation? How do I tell the print task action that it should reprint this specific product?

Thank you

You can pass ticket id through the widget into a parameter. So press complete it passes that ticket id and fires a new print task for that ticket.

but we are marking single orders as finished, not a whole ticket. I guess that by passing ticket id, the print task would not know which specific order from that ticket should be printed, right?

1 Like

Are you facing the same problem?
Once the order is completed, the waiter screen shows blank?
it was working in V5.30. But after updating it doesn’t