Merge 2016.3 Gold D patches
svn path=/Website/trunk/; revision=33274
This commit is contained in:
@@ -537,6 +537,7 @@ function verify_otp (prs_key, otprequest, otpsecret, otpcounter)
|
||||
|
||||
function getIdentity(username, wachtwoord, params)
|
||||
{
|
||||
debugger.sdfsf;
|
||||
var result = { success: false, fail_reason: L("lcl_login_wrong") };
|
||||
params = params || {};
|
||||
|
||||
@@ -546,6 +547,64 @@ function getIdentity(username, wachtwoord, params)
|
||||
if (username.indexOf("\\") > -1)
|
||||
username = username.split("\\")[1]; // strip domain name
|
||||
|
||||
// Brute force protection
|
||||
S_login_attempts = 5; // daarboven lockout
|
||||
S_login_lockout_delay = 0.2; // zoveel seconde * 2^attempts
|
||||
S_login_lockout_delayfactor = 2; // De basis van de delay-groei
|
||||
S_login_lockout_expire = 15; // zoveel minuten
|
||||
|
||||
var lockout_name = customerId + "_LOGINATTEMPTS";
|
||||
var dtExpire = new Date();
|
||||
dtExpire.setMinutes(dtExpire.getMinutes() - S_login_lockout_expire);
|
||||
debugger;
|
||||
Application.Lock();
|
||||
{
|
||||
var lockout = myJSON.parse(Application(lockout_name) || "[]");
|
||||
var found = 0;
|
||||
for (var i = 0; i < lockout.length; i++)
|
||||
{
|
||||
var lockdata = lockout[i];
|
||||
if (lockdata.lastdate < dtExpire) // Als laatste fout poging 15 minuten geleden is vergeten we alles
|
||||
{
|
||||
lockout.splice(i, 1); // verwijderen
|
||||
i--;
|
||||
continue;
|
||||
}
|
||||
if (lockdata.username == username.toLowerCase())
|
||||
{
|
||||
found = true;
|
||||
lockdata.count ++;
|
||||
lockdata.lastdate = new Date();
|
||||
}
|
||||
}
|
||||
if (!found)
|
||||
{
|
||||
lockdata = { username: username.toLowerCase(),
|
||||
count: 1,
|
||||
firstdate: new Date(),
|
||||
lastdate: new Date()
|
||||
}
|
||||
lockout.push(lockdata);
|
||||
}
|
||||
Application(lockout_name) = JSON.stringify(lockout).replace(/\{/g, "\n{");
|
||||
}
|
||||
Application.UnLock();
|
||||
|
||||
if (lockdata.count > S_login_attempts)
|
||||
{
|
||||
var dtRetry = new Date();
|
||||
dtRetry.setMinutes(dtRetry.getMinutes() + S_login_lockout_expire);
|
||||
result.fail_reason = "To many failed login attempts for {0}.\nPlease wait until {1} before trying again.".format(username, toISODateTimeString(dtRetry));
|
||||
return result;
|
||||
}
|
||||
if (lockdata.count > 1)
|
||||
{
|
||||
var oSLNKDWF = new ActiveXObject("SLNKDWF.About");
|
||||
// maximaal 80 seconde slapen, anders ASP-timeout
|
||||
var sleepsec = Math.min(80, S_login_lockout_delay * Math.pow(S_login_lockout_delayfactor, lockdata.count - 1));
|
||||
oSLNKDWF.Sleep(1000 * sleepsec);
|
||||
}
|
||||
|
||||
var logins = [];
|
||||
if (S("login_use_email"))
|
||||
{
|
||||
@@ -608,6 +667,24 @@ function getIdentity(username, wachtwoord, params)
|
||||
result = { success: true, otp_user_key: oRs("prs_perslid_key").Value };
|
||||
|
||||
oRs.Close();
|
||||
|
||||
if (user_key > 0)
|
||||
{ // Success! Wis eventuele lockout
|
||||
Application.Lock();
|
||||
var lockout = myJSON.parse(Application(lockout_name) || "[]");
|
||||
for (var i = 0; i < lockout.length; i++)
|
||||
{
|
||||
var lockdata = lockout[i];
|
||||
if (lockdata.username == username.toLowerCase())
|
||||
{
|
||||
lockout.splice(i, 1); // verwijderen
|
||||
i--;
|
||||
}
|
||||
}
|
||||
Application(lockout_name) = JSON.stringify(lockout);
|
||||
Application.UnLock();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -1499,7 +1499,7 @@ function DumpCollection(pCollection, title)
|
||||
var line = "<tr><td>" + pCollection.key(i); // + " type: " + typeof pCollection(i) + " cons: " + pCollection(i).constructor
|
||||
if (typeof pCollection(i) != "object" || pCollection(i) === null || !pCollection.HasKeys)
|
||||
{
|
||||
line += "</td><td>" + Server.HTMLEncode(String(pCollection(i)))
|
||||
line += "</td><td>" + Server.HTMLEncode(String(pCollection(i))).replace(/\n/g, "<br>");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -209,7 +209,9 @@ if (res_key > -1)
|
||||
if (prev_res_key > 0)
|
||||
{
|
||||
show_loketten(prev_res_key, prev_descr, loketten);
|
||||
%></div><%
|
||||
show_freebezoekers(prev_res_key, freebezoekers);
|
||||
%></div><%
|
||||
}
|
||||
|
||||
prev_res_key = res_key;
|
||||
@@ -263,7 +265,9 @@ if (res_key > -1)
|
||||
if (prev_res_key > 0)
|
||||
{
|
||||
show_loketten(prev_res_key, prev_descr, loketten);
|
||||
%></div><%
|
||||
show_freebezoekers(prev_res_key, freebezoekers);
|
||||
%></div><%
|
||||
}
|
||||
|
||||
function fnrowBezoekerEnabler(oRs)
|
||||
|
||||
@@ -24,20 +24,15 @@ settings =
|
||||
cache : { perfmon_threshold: { v: 2000 }, // is al nodig om de settings uit de database te kunnen halen
|
||||
// Onderstaande settings hebben een default die custpath afhankelijk is.
|
||||
// In de database kunnen ze nog wel overruled worden
|
||||
image_path_virtual: { v: custpath },
|
||||
flexfilespath: { v: Server.MapPath(custpath + "/flexfiles") },
|
||||
bdradrfiles_path: { v: Server.MapPath(custpath + "/bdradrfiles") },
|
||||
|
||||
fg_dwf_path: { v: Server.MapPath(custpath + "/dwf/") + "/" },
|
||||
fg_dwf_path_concept: { v: Server.MapPath(custpath + "/dwf/") + "/concept/" },
|
||||
fg_vlucht_path: { v: Server.MapPath(custpath + "/dwf/") + "/vlucht/" },
|
||||
fg_symbols_path: { v: Server.MapPath(custpath + "/dwf/") + "/symbols/" },
|
||||
fg_dwf_path_prj: { v: Server.MapPath(custpath + "/dwf/") + "/prj/" },
|
||||
fg_dwf_path: { v: Server.MapPath(custpath) },
|
||||
|
||||
// Merk op dat onderstaande paden (ook) via http benaderd worden. Daarom in
|
||||
// eerste instantie nog geen Server.MapPath
|
||||
// Sommige staan nog onder /flexfiles/ voor backwards compatibiliteit hoewel
|
||||
// logischer is om ze ooit allemaal onder een /photos/ te plaatsen
|
||||
image_path_virtual: { v: custpath },
|
||||
menu_image_path: { v: custpath + "/flexfiles/menu/" },
|
||||
prs_image_path: { v: custpath + "/flexfiles/prs/" },
|
||||
res_image_path: { v: custpath + "/photos/" },
|
||||
@@ -106,13 +101,34 @@ settings =
|
||||
v = this.cache[n].v;
|
||||
t = typeof v;
|
||||
}
|
||||
// Normaal gesproken zijn dit absolute paden maar we staan ook relatieve
|
||||
// paden ten opzichte van de root toe
|
||||
if (n == "flexfilespath" || n == "fg_dwf_path")
|
||||
{
|
||||
if (v.substr(0,1) == '*') // *_DATA wordt /branch20163_DATA of FPlace5i_DATA
|
||||
{
|
||||
v = Server.MapPath(rooturl) + v.substr(1) + "/" + customerId;
|
||||
var fso = Server.CreateObject("Scripting.FileSystemObject");
|
||||
v = fso.GetAbsolutePathName(v); // Technisch niet nodig maar toch '..' wegwerken
|
||||
__Log("Path {0} is set to {1}".format(n, v));
|
||||
}
|
||||
}
|
||||
|
||||
Application("SET_T_" + n) = t; // Is voor alle klanten gelijk
|
||||
Application("SET_" + customerId + "_" + n) = v;
|
||||
//Response.Write(oRs("fac_setting_name").Value + ": " + typeof v);
|
||||
oRs.MoveNext();
|
||||
|
||||
}
|
||||
oRs.Close();
|
||||
|
||||
// De diverse dwf-paden zijn altijd onder het 'hoofdpad'
|
||||
var fg_dwf_path = Application("SET_" + customerId + "_fg_dwf_path");
|
||||
Application("SET_" + customerId + "_fg_dwf_path") = fg_dwf_path + "/dwf/";
|
||||
Application("SET_" + customerId + "_fg_dwf_path_concept") = fg_dwf_path + "/dwf/concept/";
|
||||
Application("SET_" + customerId + "_fg_vlucht_path") = fg_dwf_path + "/dwf/vlucht/";
|
||||
Application("SET_" + customerId + "_fg_symbols_path") = fg_dwf_path + "/dwf/symbols/";
|
||||
Application("SET_" + customerId + "_fg_dwf_path_prj") = fg_dwf_path + "/dwf/prj/";
|
||||
|
||||
// Eigenlijk moet DBLANG ook gewoon een setting worden. Simuleer dat hier
|
||||
oRs = Oracle.Execute("SELECT fac_version_lang FROM fac_version");
|
||||
Application("SET_T_DB_LANG") = "string"; // Is voor alle klanten gelijk
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<xsl:template name="customer_code">PM</xsl:template>
|
||||
<xsl:template name="customer_email">servicedeskparkmanagement@aa-fm.com</xsl:template>
|
||||
<xsl:template name="invoice_email">invoices.parkmanagement@aa-fm.com</xsl:template>
|
||||
<xsl:template name="servicedesk_telefoon">+31 (0) 40 2332 830</xsl:template>
|
||||
<xsl:template name="servicedesk_telefoon">+31 (0) 40 2332 881</xsl:template>
|
||||
<xsl:template name="opdracht_qr_bookmark"></xsl:template>
|
||||
|
||||
|
||||
|
||||
6
CUST/MARX/import/ScanMail2Api-PROD.bat
Normal file
6
CUST/MARX/import/ScanMail2Api-PROD.bat
Normal file
@@ -0,0 +1,6 @@
|
||||
cls
|
||||
|
||||
cscript /E:javascript ScanMail2Api.js ./Mail2Api "https://marx.mareon.nl/" 1 >>genimport.log 2>>&1
|
||||
rem cscript /E:javascript ../../../Utils/gen_import/ScanMail2Api.js ./Mail2Api "https://marx.mareon.nl/" 1 >>genimport.log 2>>&1
|
||||
|
||||
|
||||
6
CUST/MARX/import/ScanMail2Api-TEST.bat
Normal file
6
CUST/MARX/import/ScanMail2Api-TEST.bat
Normal file
@@ -0,0 +1,6 @@
|
||||
cls
|
||||
|
||||
cscript /E:javascript ScanMail2Api.js ./Mail2Api "https://marx-a.mareon.nl/" 1 >>genimport.log 2>>&1
|
||||
rem cscript /E:javascript ../../../Utils/gen_import/ScanMail2Api.js ./Mail2Api "https://marx-a.mareon.nl/" 1 >>genimport.log 2>>&1
|
||||
|
||||
|
||||
202
CUST/MARX/import/ScanMail2Api.js
Normal file
202
CUST/MARX/import/ScanMail2Api.js
Normal file
@@ -0,0 +1,202 @@
|
||||
// ScanMail2p_api.js
|
||||
// Folderstructuur is als volgt:
|
||||
|
||||
// Hoofdfolder
|
||||
// Subfolder (moet geldige apinaam zijn)
|
||||
// SubSubfolder (moet geldige apikey zijn)
|
||||
// B.v. van een zo'n folder structuur: ./Mail2Api/FIN_FACTUUR_SIDB/abc123456789xyz
|
||||
|
||||
// Scan van alle subsubfolders van de subfolders onder hoofdfolder [p_hoofdfolder] alle xml's en roept voor elke xml de api conform de meegeven rooturl [p_url].
|
||||
// De apinaam is dus de naam van de subfolder.
|
||||
// De apikey is de naam van de subsubfoldernaam.
|
||||
//
|
||||
// $Revision$
|
||||
// $Id$
|
||||
//
|
||||
|
||||
var p_hoofdfolder = WScript.Arguments(0); // hoofdfolder, alle subfolders hieronder worden gescaned op xml's
|
||||
var p_url = WScript.Arguments(1); // root-url, iets als 'https://marx.mareon.nl/'
|
||||
var G_log_level = WScript.Arguments(2); // Loglevel, 0-3.
|
||||
|
||||
var G_logfolder = "./LOG/" ;
|
||||
// De aanroep voor elke gescande XML zal dan iets worden als: p_url + '?' + 'api=' + [subfoldernaam] + '&' + 'apikey=' + [subsubfoldernaam waar XML staat]
|
||||
|
||||
function __Log(s, level)
|
||||
{ if (level == undefined) level=0;
|
||||
if (G_log_level > 0 || level==0){
|
||||
if (level <= G_log_level){
|
||||
WScript.Echo(s);
|
||||
var dt = new Date;
|
||||
// De LOG-folder aanmaken als die niet bestaat...
|
||||
if (!fso.FolderExists(G_logfolder)) fso.CreateFolder(G_logfolder);
|
||||
var logname = G_logfolder + "/ScanMail_" + padout(dt.getFullYear()) + "_" + padout(dt.getMonth() + 1) + "_" + padout(dt.getDate()) + ".log";
|
||||
var flog = fso.OpenTextFile(logname, 8 /* ForAppending */, true /* create */);
|
||||
var tms = toDateString(new Date) + " " + toTimeString(new Date);
|
||||
flog.WriteLine(tms + " " +s);
|
||||
flog.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function padout(number) { return (number < 10) ? "0" + number : number; }
|
||||
function toDateString(jsDate)
|
||||
{
|
||||
return padout(jsDate.getFullYear()) + "-" + padout(jsDate.getMonth() + 1) + "-" + padout(jsDate.getDate());
|
||||
}
|
||||
|
||||
function toTimeString(jsDate)
|
||||
{
|
||||
return padout(jsDate.getHours()) + ":" + padout(jsDate.getMinutes()) + ":" + padout(jsDate.getSeconds());
|
||||
}
|
||||
|
||||
try {
|
||||
var fh, lenght;
|
||||
|
||||
|
||||
fso = new ActiveXObject("Scripting.FileSystemObject");
|
||||
objRS = new ActiveXObject("ADODB.Recordset");
|
||||
objRS.CursorLocation = 3 // useClient
|
||||
objRS.Fields.Append ("Name", 200, 100) // adVarChar
|
||||
objRS.Fields.Append ("created", 7 ) // adDate
|
||||
objRS.Fields.Append ("api", 200, 100) // adVarChar
|
||||
objRS.Fields.Append ("apikey", 200, 100) // adVarChar
|
||||
objRS.Fields.Append ("SubSubfolder", 200, 100) // adVarChar
|
||||
|
||||
objRS.Open();
|
||||
|
||||
__Log("-------------------------------------------------------- START SCAN MAIL2API --------------------------------------------------------", 1);
|
||||
|
||||
// plaats de bestandsnamen en creatiedata in een resultset om deze vervolgens te kunnen filteren.
|
||||
p_hoofdfolder = p_hoofdfolder.replace(/\//g,"\\");
|
||||
__Log("Folder: " + p_hoofdfolder, 1);
|
||||
|
||||
var hf = fso.GetFolder(p_hoofdfolder);
|
||||
var filecount = 0;
|
||||
var subfc = new Enumerator(hf.SubFolders);
|
||||
var subfoldercount = 0;
|
||||
for (; !subfc.atEnd(); subfc.moveNext())
|
||||
{
|
||||
subfoldercount++;
|
||||
l_api = subfc.item().name;
|
||||
__Log("Api: " + l_api, 1);
|
||||
l_subfolder = p_hoofdfolder + '/' + l_api;
|
||||
__Log("Subfolder: " + l_subfolder, 1);
|
||||
|
||||
|
||||
var f2 = fso.GetFolder(l_subfolder);
|
||||
|
||||
var subsubfc = new Enumerator(f2.SubFolders);
|
||||
var subsubfoldercount = 0;
|
||||
for (; !subsubfc.atEnd(); subsubfc.moveNext())
|
||||
{
|
||||
subfoldercount++;
|
||||
l_apikey = subsubfc.item().name;
|
||||
__Log("Apikey " + l_apikey, 1);
|
||||
l_subsubfolder = l_subfolder + '/' + l_apikey;
|
||||
__Log("SubSubfolder: " + l_subsubfolder, 1);
|
||||
|
||||
var f = fso.GetFolder(l_subsubfolder);
|
||||
var fc = new Enumerator(f.files);
|
||||
|
||||
for (; !fc.atEnd(); fc.moveNext())
|
||||
{
|
||||
filename = fc.item().name;
|
||||
__Log("File: " + filename, 1);
|
||||
var file = fso.GetFile(l_subsubfolder + '/' + filename);
|
||||
var dt = new Date(file.DateCreated);
|
||||
|
||||
if (fc.item().name.indexOf(".xml") != -1) {
|
||||
filecount++;
|
||||
objRS.AddNew();
|
||||
objRS("Name") = filename;
|
||||
objRS("SubSubfolder") = l_subsubfolder;
|
||||
objRS("created") = file.DateCreated;
|
||||
objRS("api") = l_api;
|
||||
objRS("apikey") = l_apikey;
|
||||
}
|
||||
}
|
||||
__Log("Filecount " + filecount, 1);
|
||||
}
|
||||
}
|
||||
|
||||
__Log("Filecount TOTAAL " + filecount, 1);
|
||||
|
||||
if (filecount > 0) {
|
||||
objRS.Sort = "SubSubfolder, Name ASC";
|
||||
objRS.MoveFirst();
|
||||
while (!objRS.EOF)
|
||||
{
|
||||
l_xml_filename = objRS("Name").Value;
|
||||
l_subsubfolder = objRS("SubSubfolder").Value;
|
||||
|
||||
l_xml_file = l_subsubfolder + "/" + l_xml_filename;
|
||||
|
||||
__Log("File (sorted): " + l_xml_file, 1);
|
||||
|
||||
var fileStream = new ActiveXObject("ADODB.Stream");
|
||||
fileStream.open();
|
||||
fileStream.CharSet = "Windows-1252"; // het doel
|
||||
fileStream.LoadFromFile(l_xml_file);
|
||||
__Log("Filesize " + fileStream.Size, 1);
|
||||
|
||||
fileStream.Position = 0;
|
||||
|
||||
XMLReq = fileStream.ReadText;
|
||||
__Log("Request: " + XMLReq, 3);
|
||||
l_api = objRS("api").Value;
|
||||
__Log("l_api: " + l_api, 3);
|
||||
l_apikey = objRS("apikey").Value;
|
||||
__Log("l_apikey: " + l_apikey, 3);
|
||||
l_url = p_url + "?API=" + l_api + "&APIKEY=" + l_apikey
|
||||
__Log("URL: " + l_url, 1);
|
||||
|
||||
try
|
||||
{
|
||||
var backdir_api = l_subsubfolder + "./BACKUP"+(new Date).getFullYear()+"/";
|
||||
if (!fso.FolderExists(backdir_api))
|
||||
fso.CreateFolder(backdir_api);
|
||||
//backdir_api += api + "\\";
|
||||
//if (!fso.FolderExists(backdir_api))
|
||||
// fso.CreateFolder(backdir_api);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
__Log("Cannot create backup folder " + backdir_api + "\n" + e.description);
|
||||
WScript.Quit();
|
||||
}
|
||||
|
||||
var objXMLHTTP = new ActiveXObject("MSXML2.ServerXMLHTTP.6.0");
|
||||
|
||||
objXMLHTTP.open("POST",
|
||||
l_url
|
||||
);
|
||||
|
||||
objXMLHTTP.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
|
||||
objXMLHTTP.send(XMLReq);
|
||||
|
||||
__Log("Status: " + objXMLHTTP.status, 1);
|
||||
__Log("StatusText: " + objXMLHTTP.statusText);
|
||||
__Log("Result: " + objXMLHTTP.responseText, 1);
|
||||
|
||||
if (objXMLHTTP.status == 200) {
|
||||
|
||||
jsDate = new Date;
|
||||
dateString = padout(jsDate.getFullYear()) + "-" + padout(jsDate.getMonth() + 1) + "-" + padout(jsDate.getDate());
|
||||
timeString = padout(jsDate.getHours()) + "-" + padout(jsDate.getMinutes() + 1) + "-" + padout(jsDate.getSeconds());
|
||||
backDir = backdir_api + dateString + "_" + "bck" + "\\";
|
||||
if (!fso.FolderExists(backDir))
|
||||
fso.CreateFolder(backDir);
|
||||
|
||||
fso.MoveFile(l_xml_file, backDir + timeString + "_" + l_xml_filename);
|
||||
}
|
||||
|
||||
objRS.MoveNext();
|
||||
}
|
||||
}
|
||||
__Log("-------------------------------------------------------- END SCAN MAIL2API --------------------------------------------------------", 1);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
WScript.Echo("Serieuze fout in MaasStatusResponse.js: " + e.description)
|
||||
WScript.Quit(1);
|
||||
}
|
||||
@@ -467,6 +467,26 @@ bes_punch_receive = function (RequestForm, bes_srtdeel_key, item, pResult)
|
||||
result.orderurl = "&leverdatum=" + (new Date(leverdatum)).getTime();
|
||||
}
|
||||
}
|
||||
// Alleen voor leverancier Postma & Cohen uitvoeren (prs_bedrijf_key = 90815)
|
||||
if (bedr_key == 90815)
|
||||
{
|
||||
// PostmaBestelling-kenmerk
|
||||
var ref_lev = punchNVL("NEW_ITEM-CUST_FIELD3[#]", item, "Onbekend");
|
||||
__Log('PostmaBestelling: CUST_FIELD3[' + item + ']= ' + ref_lev);
|
||||
if (ref_lev != 'Onbekend')
|
||||
{
|
||||
sql = "UPDATE bes_srtdeel SET bes_srtdeel_opmerking = " + safe.quoted_sql(ref_lev) + " WHERE bes_srtdeel_key = " + bes_srtdeel_key;
|
||||
Oracle.Execute(sql);
|
||||
}
|
||||
// BTW-veld
|
||||
var btw_perc = punchNVL("NEW_ITEM-CUST_FIELD4[#]", item, "Onbekend");
|
||||
__Log('BTW: CUST_FIELD4[' + item + ']= ' + btw_perc);
|
||||
if (btw_perc != 'Onbekend')
|
||||
{
|
||||
sql = "UPDATE bes_srtdeel SET bes_srtdeel_btw = ROUND(" + parseFloat(btw_perc) + ") WHERE bes_srtdeel_key = " + bes_srtdeel_key;
|
||||
Oracle.Execute(sql);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
215
CUST/UWVA/xsl/PostmaCohen.xsl
Normal file
215
CUST/UWVA/xsl/PostmaCohen.xsl
Normal file
@@ -0,0 +1,215 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
|
||||
|
||||
<xsl:decimal-format name="european" decimal-separator="." grouping-separator=","/>
|
||||
|
||||
<xsl:param name="mode"/>
|
||||
|
||||
<xsl:template match="bestelopdracht">
|
||||
<xsl:comment>Facilitor custom XSL template for cXML bestelopdracht</xsl:comment>
|
||||
<xsl:element name="cXML">
|
||||
<xsl:attribute name="payloadID"><xsl:value-of select="datum/timestamp"/>@http://mycomp.com</xsl:attribute>
|
||||
<xsl:attribute name="timestamp"><xsl:value-of select="/facilitor/header/dateYear"/>-<xsl:value-of select="/facilitor/header/dateMonth"/>-<xsl:value-of select="/facilitor/header/dateDay"/>T<xsl:value-of select="substring(/facilitor/header/dateTime,12,8)"/>+01:00</xsl:attribute>
|
||||
<xsl:attribute name="xml:lang">NL</xsl:attribute>
|
||||
<Header>
|
||||
<From>
|
||||
<Credential domain="Facilitor" type="marketplace">
|
||||
<Identity>order@facilityplace.nl</Identity>
|
||||
</Credential>
|
||||
</From>
|
||||
<To>
|
||||
<xsl:element name="Credential">
|
||||
<xsl:attribute name="domain"><xsl:value-of select="bedrijf/naam"/></xsl:attribute>
|
||||
<Identity>
|
||||
<xsl:value-of select="bedrijf/leverancier_nr"/>
|
||||
</Identity>
|
||||
</xsl:element>
|
||||
</To>
|
||||
<Sender>
|
||||
<Credential domain="Facilitor">
|
||||
<Identity>order@facilityplace.nl</Identity>
|
||||
</Credential>
|
||||
<UserAgent></UserAgent>
|
||||
</Sender>
|
||||
</Header>
|
||||
<Request deploymentMode="test">
|
||||
<OrderRequest>
|
||||
<xsl:element name="OrderRequestHeader">
|
||||
<xsl:attribute name="orderID">A-<xsl:value-of select="bestelling/key"/></xsl:attribute>
|
||||
<xsl:attribute name="orderDate"><xsl:value-of select="/facilitor/bestelopdracht/datum/jaar"/>-<xsl:value-of select="/facilitor/bestelopdracht/datum/maand"/>-<xsl:value-of select="/facilitor/bestelopdracht/datum/dag"/></xsl:attribute>
|
||||
<xsl:attribute name="type">new</xsl:attribute>
|
||||
<Total>
|
||||
<Money currency="EUR">
|
||||
<xsl:value-of select="format-number(sum(bestelopdrachtitem/totaal), '0.00', 'european')"/>
|
||||
</Money>
|
||||
</Total>
|
||||
<ShipTo>
|
||||
<xsl:element name="Address">
|
||||
<xsl:attribute name="addressID"><xsl:value-of select="bedrijf/overeenkomst_nr"/></xsl:attribute>
|
||||
<Name xml:lang="NL">UWV(<xsl:value-of select="bestelling/voor/werkplek[myvolgnr='2']/plaats/regio/district/locatie/gebouw/afleveradres/naam"/>)</Name>
|
||||
<PostalAddress name="default">
|
||||
<DeliverTo>
|
||||
<xsl:value-of select="bestelling/voor/naam_full"/>
|
||||
</DeliverTo>
|
||||
<!-- Aanname: IEDEREEN heeft een 2-werkplek!!! -->
|
||||
<DeliverTo>
|
||||
<xsl:value-of select="bestelling/voor/werkplek[myvolgnr='2']/plaats/plaatsaanduiding"/>
|
||||
</DeliverTo>
|
||||
<Street>
|
||||
<xsl:value-of select="bestelling/voor/werkplek[myvolgnr='2']/plaats/regio/district/locatie/gebouw/afleveradres/bezoek_adres"/>
|
||||
</Street>
|
||||
<City>
|
||||
<xsl:value-of select="bestelling/voor/werkplek[myvolgnr='2']/plaats/regio/district/locatie/gebouw/afleveradres/bezoek_plaats"/>
|
||||
</City>
|
||||
<State></State>
|
||||
<PostalCode>
|
||||
<xsl:value-of select="bestelling/voor/werkplek[myvolgnr='2']/plaats/regio/district/locatie/gebouw/afleveradres/bezoek_postcode"/>
|
||||
</PostalCode>
|
||||
<Country isoCountryCode="NL">Netherlands</Country>
|
||||
</PostalAddress>
|
||||
</xsl:element>
|
||||
<Email>
|
||||
<xsl:value-of select="bestelling/voor/email"/>
|
||||
</Email>
|
||||
<Phone>
|
||||
<TelephoneNumber>
|
||||
<CountryCode isoCountryCode="NL"/>
|
||||
<AreaOrCityCode/>
|
||||
<Number>
|
||||
<xsl:value-of select="bestelling/voor/telefoonnr"/>
|
||||
</Number>
|
||||
</TelephoneNumber>
|
||||
</Phone>
|
||||
</ShipTo>
|
||||
<BillTo>
|
||||
<xsl:element name="Address">
|
||||
<xsl:attribute name="addressID">AMSG3</xsl:attribute>
|
||||
<Name xml:lang="NL">UWV</Name>
|
||||
<Contactpersoon>
|
||||
<xsl:value-of select="factuuradres/contactpersoon"/>
|
||||
</Contactpersoon>
|
||||
<Contactpers_telefoon>
|
||||
<xsl:value-of select="factuuradres/contactpers_telefoon"/>
|
||||
</Contactpers_telefoon>
|
||||
<PostalAddress name="default">
|
||||
<Street>
|
||||
<xsl:value-of select="factuuradres/post_adres"/>
|
||||
</Street>
|
||||
<City>
|
||||
<xsl:value-of select="factuuradres/post_plaats"/>
|
||||
</City>
|
||||
<State></State>
|
||||
<PostalCode>
|
||||
<xsl:value-of select="factuuradres/post_postcode"/>
|
||||
</PostalCode>
|
||||
<Country isoCountryCode="NL">Netherlands</Country>
|
||||
</PostalAddress>
|
||||
</xsl:element>
|
||||
</BillTo>
|
||||
<Contact>
|
||||
<Name xml:lang="NL">
|
||||
<xsl:value-of select="bestelling/aanvrager/naam_full"/>
|
||||
</Name>
|
||||
<Email>
|
||||
<xsl:value-of select="bestelling/aanvrager/email"/>
|
||||
</Email>
|
||||
<Phone>
|
||||
<TelephoneNumber>
|
||||
<CountryCode isoCountryCode="NL"/>
|
||||
<AreaOrCityCode/>
|
||||
<Number>
|
||||
<xsl:value-of select="bestelling/aanvrager/telefoonnr"/>
|
||||
</Number>
|
||||
</TelephoneNumber>
|
||||
</Phone>
|
||||
</Contact>
|
||||
<Payment>
|
||||
<PCard number="1234567890123456" expiration="1999-03-12"/>
|
||||
</Payment>
|
||||
<Extrinsic name="Costcenter">
|
||||
<xsl:value-of select="bestelling/kostenplaats/nr"/>
|
||||
</Extrinsic>
|
||||
<Extrinsic name="OrgBestelbevoegde">
|
||||
<xsl:value-of select="bestelling/voor/afdeling/naam6"/>
|
||||
</Extrinsic>
|
||||
<Extrinsic name="OrgAbonnee">
|
||||
<xsl:value-of select="bestelling/voor/afdeling/naam6"/>
|
||||
</Extrinsic>
|
||||
<xsl:for-each select="bestelling/kenmerk">
|
||||
<xsl:if test="@type!='Q' and @type!='L'">
|
||||
<xsl:element name="Extrinsic">
|
||||
<xsl:attribute name="name"><xsl:value-of select="@naam"/></xsl:attribute>
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:element>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:element>
|
||||
|
||||
<xsl:for-each select="bestelopdrachtitem">
|
||||
<xsl:sort select="srtdeel/omschrijving"/>
|
||||
<xsl:sort select="posnr"/>
|
||||
|
||||
<xsl:element name="ItemOut">
|
||||
<xsl:attribute name="quantity"><xsl:value-of select="aantal"/></xsl:attribute>
|
||||
<xsl:attribute name="lineNumber"><xsl:value-of select="posnr"/></xsl:attribute>
|
||||
<xsl:attribute name="requestedDeliveryDate"><xsl:value-of select="/facilitor/bestelopdracht/bestelling/leverdatum/jaar"/>-<xsl:value-of select="/facilitor/bestelopdracht/bestelling/leverdatum/maand"/>-<xsl:value-of select="/facilitor/bestelopdracht/bestelling/leverdatum/dag"/></xsl:attribute>
|
||||
<ItemID>
|
||||
<SupplierPartID>
|
||||
<xsl:value-of select="bestelitem/srtdeel/artikel_nummer"/>
|
||||
</SupplierPartID>
|
||||
</ItemID>
|
||||
<ItemDetail>
|
||||
<UnitPrice>
|
||||
<Money currency="EUR">
|
||||
<xsl:value-of select="prijs"/>
|
||||
</Money>
|
||||
</UnitPrice>
|
||||
<Description xml:lang="NL">
|
||||
<xsl:value-of select="bestelitem/srtdeel/omschrijving"/>
|
||||
</Description>
|
||||
<UnitOfMeasure>
|
||||
<xsl:value-of select="bestelitem/srtdeel/eenheid"/>
|
||||
</UnitOfMeasure>
|
||||
<Classification domain="SPSC">12345</Classification>
|
||||
<Extrinsic name="PostmaBestelling">
|
||||
<xsl:value-of select="bestelitem/srtdeel/opmerking"/>
|
||||
</Extrinsic>
|
||||
<xsl:for-each select="bestelitem/kenmerk">
|
||||
<xsl:if test="@type!='Q' and @type!='L'">
|
||||
<xsl:element name="Extrinsic">
|
||||
<xsl:attribute name="name"><xsl:value-of select="@naam"/></xsl:attribute>
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:element>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</ItemDetail>
|
||||
</xsl:element>
|
||||
</xsl:for-each>
|
||||
</OrderRequest>
|
||||
</Request>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="facilitor">
|
||||
<xsl:apply-templates select="bestelopdracht"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$mode='getExtension'">
|
||||
<xsl:element name="format">
|
||||
<xsl:element name="extension">xml</xsl:element>
|
||||
</xsl:element>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates select="facilitor"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
<!-- Stylus Studio meta-information - (c) 2004-2007. Progress Software Corporation. All rights reserved.
|
||||
<metaInformation>
|
||||
<scenarios ><scenario default="yes" name="Scenario1" userelativepaths="yes" externalpreview="no" url="..\..\..\TEMP\UWVA_files\bestelopdr235576_20150112131718.xml" htmlbaseurl="" outputurl="" processortype="internal" useresolver="yes" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal" customvalidator=""/></scenarios><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/><MapperBlockPosition></MapperBlockPosition><TemplateContext></TemplateContext><MapperFilter side="source"></MapperFilter></MapperMetaTag>
|
||||
</metaInformation>
|
||||
-->
|
||||
Reference in New Issue
Block a user