vhLib.Macro %CSP.Page 0 text/xml /csp/admin1/PRGAProduct.csp 0 1 code 0 %Status 0 Invalid data." Quit opgXMLFromGlobal If $L(CheckDigit) Quit:(CheckDigit'=$P($G(^Hulp(Key,"I")),"\",1)) Write:($D(^Hulp(Key,"S"))#10) ^Hulp(Key,"S") Quit opgXMLKaderdeurViaID(ProdID) New PR Set PR=##class(Prod.GADef.KaderDeur).%OpenId(ProdID) Quit:('$IsObject(PR)) Do PR.XMLWrite(0,"N","GAO;GAF;GAV",$S($G(%request.Data("NOXSL",1))=1:"", 1:"Format GADefKader.xsl")) Set PR="" Quit opgXMLViaID(ProdID) New arValidPR,PR Set PR=##class(Prod.GAData.Product).OpenWithCalc(ProdID) Quit:('$IsObject(PR)) If 'PR.ValidatePR(.arValidPR) Do opgInvalidPR Do PR.XMLWrite(0,"N","GAF;GAO",$S($G(%request.Data("NOXSL",1))=1:"", 1:"Format GAProduct.xsl")) Do:($G(%request.Data("TOGLOB",1))=1) opgXMLtoGlobal Do PR.%Close() Quit opgInvalidPR #define CRLF $C(13,10) New tmpRqCGI,msg,Key,DItem,tmpLB Merge tmpRqCGI=%request.CgiEnvs Set msg="Fouten bij de validatie van de producten (IP:"_tmpRqCGI("REMOTE_ADDR")_") :" Set Key="" For Set Key=$O(arValidPR(0,Key)) Quit:(Key="") Do . Set DItem=PR.DataItems.GetAt(Key) . Do opgBuildColumnData . Set msg=msg_$$$CRLF_"> "_DItem.Get("Oms")_" ("_DItem.Code_") : "_$S(DItem.MetaItem.Code="KST":"MatKost="_$$$LCVT(DItem.CalcMat()), 1:"PRNr="""_DItem.Get("PRNr")_""""_$S(0:" Kenm="_$$$LCVT(DItem.Get("Kenm")),1:"")) . Set msg=msg_$$$CRLF_"> "_$$LCVT^vhLib(tmpLB) d WL^vhDBG(msg) Quit opgBuildColumnData #define LBDeleteAt(%lb,%i) $LI(%lb,1,%i-1)_$LI(%lb,%i+1,-1) New MParam,MetaI,i Set MetaI=DItem.MetaItem Set tmpLB="" Set PKey="" For Set MParam=MetaI.Parameters.GetNext(.PKey) Quit:(PKey="") Do:(MParam.KolomNr>0) . Set $LI(tmpLB,MParam.KolomNr)=DItem.Get(PKey) For i=$LL(tmpLB):-1:1 Set:('$LD(tmpLB,i)) tmpLB=$$$LBDeleteAt(tmpLB,i) ; Lege ListItems verwijderen Quit opgXMLtoGlobal New Key,CStream Set Key=$$%J^vhRtn1_"TBX" Set CStream=##class(%GlobalCharacterStream).%New() Do PR.XMLWrite(CStream,"N","GAF;GAO","Format GAProduct.xsl") d WL^vhDBG("WBrKey :"_Key_" "_" op "_$G(ComputerName,$ZUTIL(110))_" / "_$G(NameSpace,$ZUTIL(67,6,$J))) Do txoXMLToGlobal(Key,0) Do CStream.%Close() Quit txoXMLToGlobal(Key,CheckDigits) Quit:(Key="") Kill ^wvXML("GA.PR",Key) Set ^wvXML("GA.PR",Key,"I")=CheckDigits_"\"_"\"_$J Set ^wvXML("GA.PR",Key,"S")=CStream.Read(CStream.Size) Quit ]]> 1 %Boolean 1