Files
Mareon/ax/SRC/T_AcceptServiceTask.js
2015-01-21 12:41:03 +00:00

34 lines
1.1 KiB
JavaScript

// --------------------------------------------------------------------------------------
// T_AcceptServiceTask.js
// Copyright 2014 SG|facilitor. 053-4800 700, helpdesk@sgfacilitor.nl
// Written by MB (2014)
//
// v_company_id is hier dummy, puur uit orthogonaliteit met de AX functie.
// v_bonId is hier de bonid, uit het veld mld_opdr_ordernr.
// v_ja_nee heeft waarde Ja (= geaccepteerd) of Nee (= geweigerd).
function T_AcceptServiceTask(v_company_id, v_bonId, v_ja_nee)
{
var v_API = "SetBonAcceptatie";
var v_req = "<tob:string>BonId=" + v_bonId + "</tob:string>"
+ "<tob:string>BonStatus=" + "Acceptatie" + "</tob:string>"
+ "<tob:string>Geaccepteerd=" + v_ja_nee + "</tob:string>"
var v_type = 0;
var v_resp = apiAX(v_API, v_req, v_type);
//if (v_type == 1 && v_resp != "")
// {
// oStream = new ActiveXObject("ADODB.Stream");
// oStream.Open();
// oStream.Type = 1; // adTypeBinary
// oStream.Write(v_resp); // responseText geeft encoding problemen!
// oStream.SaveToFile ("Log/test" + v_supplier_id + ".xml", 2);
// oStream.Close();
// }
return v_resp;
}