SambaPOS 5.1.48 - 5.1.49 features

5.1.49 Download: http://sambapos.com/?wpfb_dl=130

I’m releasing 5.1.49 earlier than planned to fix that issue

##New 5.1.49 Features

Data Export configuration accepts file name templates. If I use star character (*) as a file name placeholder, default folder and default extension will determined from template.

For example:

If I configure file name as C:\Users\Emre\Documents\SambaPOS5\*.xml Save File Dialog will appear as…

##New 5.1.48 features


Hide Header setting added to Navigate Module action. When true it will hide entity screen switching buttons that appears on top of entity screens. http://forum.sambapos.com/t/5-1-46-unexpected-behavior-with-entity-screens/6910/5


Hide Entity Screen Header setting added to CID and Twitter Order devices so when clicked on popups we may control if entity screen switching buttons will appear or not.


Initial Catalog setting in Connection Editor removed.


Importing scripts into your script. This example shows how to import pad function from another script. That script’s handler name is str.

You can include methods from other scripts with that syntax.

variable=script.Load("<handler>","<method1>","<method2>",...);

so I’ve added this line on top of your function and voila!!

str=script.Load("str","pad");

You need to declare method names you’ll use for performance issues. Otherwise I need to compile script to figure out available methods. Hope it will be useful.

###Note

You can import methods once globally so it won’t create new handler instances for each function.

var str=script.Load("str","pad");

function UpdateDescription() {
  var d = new Date();
  var dt = "";
  dt +=           d.getUTCFullYear();
  dt += "-" + str.pad(d.getUTCMonth(),'left',2,"0"); // call handler: str, function: pad
  dt += "-" + str.pad(d.getUTCDay(),'left',2,"0");
  dt += " " + str.pad(d.getHours(),'left',2,"0");
  dt += ":" + str.pad(d.getUTCMinutes(),'left',2,"0");
  dt += ":" + str.pad(d.getUTCSeconds(),'left',2,"0");
  dt += "." + str.pad(d.getUTCMilliseconds(),'left',3,"0");
  return dt;
}

License info protection while creating new databases via Local Settings > Database Connection page.


Description parameter added to Payment Processed rule.


###Passing parameters to Custom Report Viewer Widget

Refresh Custom Report Widget Action added to refresh report widgets and passing parameters.

Report Parameters value is a comma separated value that replaces $x placeholders in report template. So…

$1 value replaces with Report Parameters value.

In this sample Editor Widget executes Display Delivery Report automation command with entered value as Command Parameter.

Parameters setting also added to Print Report and Save Report actions.


web.PostData(<url>,<data>,[<user>],[<password>]) and web.PostJson(<url>,<json>,[<user>],[<password>]) functions added to JScript.

Both functions are identical but web.PostJson function adds "Content-Type", "application/json" header to the request.

3 Likes

We will need this setting in the Automation Command > Navigation section as well.

Why? Does headers still appears?

Yes, they do, when you use that Navigation function in the Automation Command (as opposed to leaving it blank and using Navigate Module Action and Rule).

At first I couldn’t figure out why this was only happening in some screens, but it is because some of my Tiles are not using Action/Rule; instead they are using Navigation section in Automation Command.

I’m not sure when the Navigation section had the return of this feature, because it was gone for many of the Beta releases and seems it just recently re-appeared.

Can you tell me which button exactly does not work as expected? I’ve restored one of your backups to test.

OK nevermind. I think I found Time Clock button one of these. We had a rule there. If you specify an entity screen name (module parameter) we hide headers. I’ve fixed that rule for next version.

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.