svn path=/Website/trunk/; revision=17340

This commit is contained in:
Peter Koerhuis
2013-03-22 16:24:57 +00:00
parent 2b306716d1
commit cc3e2ce4b6
5 changed files with 92 additions and 79 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -1,74 +0,0 @@
// Putorders.ini
//
// SAMPLE configuration file for Facilitor PutOrders routine.
// This routine handles the internal Facilitor orders and notifications queueus and
// takes care of sending these messages into the world. It normally is the only way out
// for messages from Facilitor
//
// Several protocols are supported, like e-mail, SMS, FTP, HTTP and XML/SOAP
// Its actual behaviour (like which messages are send by what means) is defined
// by the applicationmanager using several settings, parameters and XSL stylesheets
//
// This sample needs to be copied to the ../../CUST/XXXX/Putorders folder, where
// all the actual and appropriate settings *need* to be altered on installation.
//
// $Revision$
// $Modtime: 16-03-07 11:19 $
//
[SYSTEM]
// The FULL FYSICAL (LOCAL) PATH to the Facilitor webroot folder (containing a.o. global.asa)
FacilitorHome = "c:/Websites/Facilitor/curs&demo"
[ADO]
ConnectionString = "File Name=..\Oracle.udl "
Database_Name = "ORACLE"
CustomerId = "DEMO"
[GENERAL]
FlexfilesFolder = "c:/Websites/Facilitor/curs&demo/cust/demo/flexfiles/"
;// 0 = as attachments, 1 = in body
NotificationInMailBody = "1"
;// stylesheet to be applied for notifications
NotificationXSL = "../xsl/cust.xsl"
;// Mail subject prefix for orders (to be followed by ordernr)
SubjectPrefix = "Facilitor bestelling: Bestelopdracht nr."
;// the fixed From address for Facilitor orders
FromAddress = "noreply@demo.facilitor.nl"
;// optional reply address if that is different from FromAddress
ReplyAddress = "p.koerhuis@sgfacilitor.nl"
;// Level of logging (0-3) for troubleshooting purposes
LogLevel = 255
;// INTERNET_FLAG_PASSIVE = 0x8000000, else = 0
ConnectionFlag = 0
;// 1 = Use Proxy Server (recognizes TIS FTP gateway only), 0 = don't use Proxy
UseProxy = 0
;// Proxy Server IP Address, only used when UseProxy = 1
ProxyServerIPAddress = "127.0.0.1:8888"
;// SOAP Certificate reference
SoapCertificateName = LOCAL_MACHINE\My\it.dijkoraad.nl
;; Minuten
NotificationDelay=1
LogDestination = 3
EmergencyMailAddress = "p.koerhuis@sgfacilitor.nl"
CustOrders = 0
; // force this email address for test purposes
ForceMailAddress = "p.koerhuis@sgfacilitor.nl"
; // force this order address for test purposes
ForceOrderAddress = "mailto:p.koerhuis@sgfacilitor.nl"
; // force this mobile number for test purposes
ForceFromAddress = "noreply@demo.facilitor.nl"
ForceMobile = "31651330622"
MailBodyCharSet="unicode-1-1-utf-7"
UseSenderAsReplyTo=1
[SMS]
SmsAccount = ""
;// SMS accountinfo
UID = ""
PWD = ""
ReplyPhone = ""
SMSProtocol = ""

View File

@@ -1 +0,0 @@
..\..\..\utils\putOrders\putOrders.exe

View File

@@ -1,6 +1,7 @@
<%@ language = "JavaScript" %>
<%
DOCTYPE_Disable = 1;
ANONYMOUS_Allowed = 1;
// Lees de vraagstelling in die via XML binnenkomt
Response.Expires=0;
@@ -23,9 +24,9 @@ if (objReq.parseError.errorCode != 0)
}
// Zoek het partnummer
var strQuery = "facilitor/stock_request/part/number";
var strQuery = "stock_request/part/number";
objPart = objReq.selectSingleNode(strQuery);
strQuery = "facilitor/stock_request/part/group";
strQuery = "stock_request/part/group";
objGroup = objReq.selectSingleNode(strQuery);
if (!objPart)
{
@@ -38,7 +39,7 @@ if (!objPart)
// Response.End;
var l_voorraad = bepaal_voorraad_van_artikel(objPart.text, objGroup.text);
var l_voorraad = bepaal_voorraad_van_artikel_dummy(objPart.text, objGroup.text);
__DoLog (l_voorraad);
var xmlDoc = new ActiveXObject("MSXML2.DOMDocument.4.0");
@@ -50,7 +51,7 @@ rootElement = xmlDoc.createElement("stock_response");
elementNumberText = xmlDoc.createTextNode(objPart.text);
elementNumber.appendChild(elementNumberText);
elementPart.appendChild(elementNumber);
elementAmount = xmlDoc.createElement("amount");
elementAmount = xmlDoc.createElement("amount");
elementAmountText = xmlDoc.createTextNode(l_voorraad);
elementAmount.appendChild(elementAmountText);
elementPart.appendChild(elementAmount);
@@ -92,4 +93,28 @@ function bepaal_voorraad_van_artikel(p_artnr, p_group){
return l_result;
}
// Hieronder staat DE functie van de dummy-leverancier die in zijn database de voorraad ophaalt.
// Deze dummy-functie werkt als volgt: zoek van de eerste 4 karakters van het artikelnummer alleen de cijfers en stuur dat terug
// Wanneer de 1e 4 karakters allen geen cijfer zijn, dan wordt de waarde 0 teruggestuurd, dus geen voorraad in dat geval.
function bepaal_voorraad_van_artikel_dummy(p_artnr, p_group){
var i = 0;
var l_digits = "0123456789";
var l_result = "";
while (i<4 && p_artnr != ""){
l_char = p_artnr.charAt(0);
if (l_digits.indexOf(l_char, 0) != -1){
l_result = l_result + l_char;
}
i=i+1;
p_artnr = p_artnr.substr(1);
}
if (l_result == ""){
l_result = "0"
}
return parseInt(l_result,10);
}
%>

View File

@@ -0,0 +1,63 @@
<?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" encoding="UTF-8"/>
<xsl:decimal-format name="european" decimal-separator="." grouping-separator=","/>
<xsl:param name="mode"/>
<xsl:template match="stock_request">
<!--Facilitor custom XSL template for stock_request info -->
<xsl:element name="stock_request">
<xsl:element name="part">
<xsl:element name="number">
<xsl:value-of select="part/number"/>
</xsl:element>
<xsl:element name="group">
<xsl:value-of select="part/group"/>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:template>
<xsl:template match="stock_response">
<!--Facilitor custom XSL template for stock_response info -->
<xsl:element name="facilitor">
<xsl:element name="stock_response">
<xsl:element name="part">
<xsl:element name="number">
<xsl:value-of select="part/number"/>
</xsl:element>
<xsl:element name="amount">
<xsl:value-of select="part/amount"/>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:template>
<xsl:template match="facilitor">
<xsl:apply-templates select="folder"/>
<xsl:apply-templates select="stock_request"/>
<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:apply-templates select="stock_response"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c) 2004-2006. Progress Software Corporation. All rights reserved.
<metaInformation>
<scenarios ><scenario default="yes" name="Scenario1" userelativepaths="yes" externalpreview="no" url="file:///c:/temp/voorraadresp.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>
-->