When returning to my PMS integration project I seem to be getting an error of;
Microsoft.ClearScript.Windows.WindowsScriptItem
Even on the most basic auth_test request.
Updated samba to .54 - no change.
Script;
function authtest()
{
var url = 'https://testau.newbookpms.com/rest/auth_test';
var username = 'xxxxx';
var password = 'xxxxx';
var apikey = "instances_xxxxxx";
/*--- JSON REQUEST DATA FORATTING---*/
var requestdata = new Object();
requestdata.api_key = apikey;
var requestjson = JSON.stringify(requestdata);
/*--- JSON POST & RESPONCE---*/
var response = web.PostJson(url,requestjson,username,password);
var responseObject = JSON.parse(response);
return response;
}
@emre any sugestions, was working few weeks ago when last worked on the script.
Tested the REST and user/pass etc in another program and all still valid.
Hmmm, interesting, if had only tried on desktop i might think it was some other software conflicting in its use of jscript (have allot of clutter software on that) but the tablet have pretty much samba and vlc installed on it.
Not sure how to test what might be causing…
If it posible for other scripts to conflict?
You mean to return each var value at a time?
I presume the error suggests is a Microsoft based difference? Ie updates or win7 vs win10 differ eve between your machine and mine?
Although desktop is win7 and tablet is win10 so shouldn’t be that.
Very little has changed on my desktop since when it was working and absolutely nothing has changed on tablet, other than samba has only been used for watching breaking bad in bed since I last had the scripts working.
Defiantly not a problem on the rest side.
The message says to me that it’s a local issue.
Even if the user, pass or api-key were wrong would still return a req auth or incorrect api-key responce…
FFS… Just noticed something so so so so stupid,
Think I forgot the () after the test field - embarrassing if that’s all it was
Will check tomorrow, while in one breath I hope it wasn’t something so stupid on the other I hope it is LOL
On the subject of scripts for the pms intergration kendash said report expressions won’t work in scripts, is there any alternatives for a total sales by product group expressions which can go in scripts other than SQL?
Given the potential of scripts I’m suprised report tags aren’t usable in scripts.
Report system designed to cache work period data locally and this is not a suitable way to access data inside scripts. Until I improve that for uses other than reporting SQL is the only solution.
Could SQL return total orders by order state (which are not room post - payments ie cash or card as these will be posted on per ticket/room basis as charged)?
Am still undescided about where to just post sales as wet/dry or to break down to extent of product group.
At the minute am thinking wet/dry will be enough for general reporting in pms accounts and more detailed group based can be reported through samba which will also simplify the rest posts in the script.
Would allocate an order state using a product tag and order added tag–>state rule.
Just trying to visualise the best way to be able to diferentiate till sales vs room posts for accumulative ‘non room post’ sales for end of day post.