WZUV#41726 Fase 2: OCI koppeling Topbloemen
svn path=/Website/branches/v2017.2/; revision=36353
This commit is contained in:
96
CUST/WZUV/custfunctions.wsc
Normal file
96
CUST/WZUV/custfunctions.wsc
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<component>
|
||||||
|
<?component error="true" debug="true"?>
|
||||||
|
<registration
|
||||||
|
description="custfunctions"
|
||||||
|
progid="custfunction.wsc"
|
||||||
|
version="1.00"
|
||||||
|
classid="{4F51571C-1DFC-4769-B8DD-37B356378F12}"
|
||||||
|
>
|
||||||
|
</registration>
|
||||||
|
|
||||||
|
<public>
|
||||||
|
|
||||||
|
<!-- properties -->
|
||||||
|
<property name="Oracle">
|
||||||
|
<put/>
|
||||||
|
</property>
|
||||||
|
<property name="__Log">
|
||||||
|
<put/>
|
||||||
|
</property>
|
||||||
|
<property name="__DoLog">
|
||||||
|
<put/>
|
||||||
|
</property>
|
||||||
|
<property name="safe">
|
||||||
|
<put/>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
<!-- methods -->
|
||||||
|
<method name="bes_punch_receive">
|
||||||
|
<PARAMETER name="RequestForm"/>
|
||||||
|
<PARAMETER name="bes_srtdeel_key"/>
|
||||||
|
<PARAMETER name="item"/>
|
||||||
|
</method>
|
||||||
|
|
||||||
|
</public>
|
||||||
|
|
||||||
|
<script language="javascript">
|
||||||
|
<![CDATA[
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
$Revision$
|
||||||
|
$Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
function put_Oracle(newValue) {Oracle = newValue};
|
||||||
|
function put___Log(newValue) {__Log = newValue};
|
||||||
|
function put___DoLog(newValue) {__DoLog = newValue};
|
||||||
|
function put_safe(newValue) {safe = newValue};
|
||||||
|
|
||||||
|
var Oracle;
|
||||||
|
var __Log;
|
||||||
|
var __DoLog;
|
||||||
|
var safe;
|
||||||
|
|
||||||
|
bes_punch_receive =
|
||||||
|
function (RequestForm, bes_srtdeel_key, item, pResult)
|
||||||
|
{
|
||||||
|
var result = {orderurl: ""};
|
||||||
|
sql = "SELECT sd.prs_bedrijf_key FROM bes_srtdeel sd WHERE sd.bes_srtdeel_key = " + bes_srtdeel_key;
|
||||||
|
oRs = Oracle.Execute(sql);
|
||||||
|
bedr_key = oRs("prs_bedrijf_key").value;
|
||||||
|
|
||||||
|
function punchNVL(nm, n, def)
|
||||||
|
{
|
||||||
|
nm = nm.replace('#', n);
|
||||||
|
if (RequestForm(nm).Count() == 0)
|
||||||
|
return def;
|
||||||
|
if (RequestForm(nm) == "")
|
||||||
|
return def;
|
||||||
|
return RequestForm(nm)(1);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// Alleen voor leverancier Topbloemen uitvoeren (prs_bedrijf_key = 9853 in prd / 8959 in accept)
|
||||||
|
if (bedr_key == 9853)
|
||||||
|
{
|
||||||
|
// Alleen voor eerste item het bestelid opvragen. Is toch voor elk item identiek.
|
||||||
|
if (item == 1) {
|
||||||
|
|
||||||
|
// Voor Topbloemen moet Facilitor het ordernummer vanuit de webshop 1-op-1 overnemen en in de bestelopdracht terugsturen:
|
||||||
|
//Uw referentie
|
||||||
|
var mijn_orderid = punchNVL("NEW_ITEM-VENDORMAT", item, "Onbekend");
|
||||||
|
__Log('Uw orderid: CUST_FIELD1[' + item + ']= ' + mijn_orderid);
|
||||||
|
|
||||||
|
if (mijn_ref != "Onbekend")
|
||||||
|
//straks vanaf 5.3.3 gebruiken: result.flex_defaults = result.flex_defaults + "&Orderid=" + safe.URLEncode(mijn_orderid);
|
||||||
|
result.flex_defaults = result.flex_defaults + "&Orderid=" + mijn_orderid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
|
||||||
|
]]>
|
||||||
|
</script>
|
||||||
|
</component>
|
||||||
Reference in New Issue
Block a user