Index: BL/EC/Data.cls.xml
===================================================================
diff -u -r2009 -r2038
--- BL/EC/Data.cls.xml (.../Data.cls.xml) (revision 2009)
+++ BL/EC/Data.cls.xml (.../Data.cls.xml) (revision 2038)
@@ -2988,74 +2988,89 @@
Set Status=$$$OK ;Invullen bij fout (komt in de logging terecht=INTERNAL MESSAGE, gebruiker ziet deze boodschap NIET)
Set InterfaceError="" ;Invullen als een andere boodschap dan de standaard boodschap aan de gebruiker moet getoond worden
+ /*** *** /
+ // Tijdelijk aanpassen van de input-parameters om de oproepen van PrijsLijst te kunnen testen (Added by WimV on 08/09/2011)
+ If Toegang=$$$tgFactuur Do
+ . Set Toegang=$$$tgPrijsLijst
+ . Set RecordType=$$$rtCHECK
+ . Set DocNr=""
+ Else If Toegang=$$$tgWebShop Do
+ . Set Toegang=$$$tgPrijsLijst
+ . Set RecordType=$$$rtPDF ; $$$rtXML ;
+ . Set DocNr=""
+ /*** ***/
+
;Factuur
If Toegang=$$$tgFactuur Do
. Set Status=##class(BL.Flow.Factuur.Doc).ValidateFactNr("F",DocNr,KlantNr)
. Quit:($$$ISERR(Status))
. If RecordType=$$$rtPDF Do
- .. Set FileName=$TR($System.Encryption.Base64Encode(URLKey),"+="_$C(10,13),"_")_"FAC"_DocNr_".pdf"
- .. Set Status=##class(BL.Flow.Factuur.Doc).RenderAndFtpDoc(DocNr,,,$$$vHisieDownloadIntern,,FileName)
- .. Set:($$$ISOK(Status)) DocURL=$$$vHisieDownloadExtern_"/"_FileName
+ . . Set FileName=$TR($System.Encryption.Base64Encode(URLKey),"+="_$C(10,13),"_")_"FAC"_DocNr_".pdf"
+ . . Set Status=##class(BL.Flow.Factuur.Doc).RenderAndFtpDoc(DocNr,,,$$$vHisieDownloadIntern,,FileName)
+ . . Set:($$$ISOK(Status)) DocURL=$$$vHisieDownloadExtern_"/"_FileName
;Order
Else If (Toegang=$$$tgOrder) || (Toegang=$$$tgContractOrder) Do
. Set Status=##class(BL.Flow.Order.Doc).ValidateORDNr(DocNr,KlantNr)
. Quit:($$$ISERR(Status))
. If RecordType=$$$rtPDF Do
- .. Set FileName=$TR($System.Encryption.Base64Encode(URLKey),"+="_$C(10,13),"_")_"ORD"_DocNr_".pdf"
- .. Set Status=##class(BL.Flow.Order.Doc).RenderAndFtpDoc(DocNr,$$$vHisieDownloadIntern,,FileName)
- .. Set:($$$ISOK(Status)) DocURL=$$$vHisieDownloadExtern_"/"_FileName
+ . . Set FileName=$TR($System.Encryption.Base64Encode(URLKey),"+="_$C(10,13),"_")_"ORD"_DocNr_".pdf"
+ . . Set Status=##class(BL.Flow.Order.Doc).RenderAndFtpDoc(DocNr,$$$vHisieDownloadIntern,,FileName)
+ . . Set:($$$ISOK(Status)) DocURL=$$$vHisieDownloadExtern_"/"_FileName
;Offerte
Else If Toegang=$$$tgOfferte Do
. Set Status=##class(BL.Flow.Offerte.Doc).ValidateOFFNr(DocNr,KlantNr)
. Quit:($$$ISERR(Status))
. If RecordType=$$$rtPDF Do
- .. Set FileName=$TR($System.Encryption.Base64Encode(URLKey),"+="_$C(10,13),"_")_"OFF"_DocNr_".pdf"
- .. Set Status=##class(BL.Flow.Offerte.Doc).RenderAndFtpDoc("O-"_DocNr,$$$vHisieDownloadIntern,,FileName)
- .. Set:($$$ISOK(Status)) DocURL=$$$vHisieDownloadExtern_"/"_FileName
+ . . Set FileName=$TR($System.Encryption.Base64Encode(URLKey),"+="_$C(10,13),"_")_"OFF"_DocNr_".pdf"
+ . . Set Status=##class(BL.Flow.Offerte.Doc).RenderAndFtpDoc("O-"_DocNr,$$$vHisieDownloadIntern,,FileName)
+ . . Set:($$$ISOK(Status)) DocURL=$$$vHisieDownloadExtern_"/"_FileName
;Uitlevering
Else If Toegang=$$$tgUitlevering Do
. Set Status=##class(BL.Flow.Levering.Doc).ValidateBONNr(DocNr,KlantNr)
. Quit:($$$ISERR(Status))
. If RecordType=$$$rtPDF Do
- .. Set FileName=$TR($System.Encryption.Base64Encode(URLKey),"+="_$C(10,13),"_")_"LEV"_DocNr_".pdf"
- .. Set Status=##class(BL.Flow.Levering.Doc).RenderAndFtpDoc(DocNr,$$$vHisieDownloadIntern,,FileName)
- .. Set:($$$ISOK(Status)) DocURL=$$$vHisieDownloadExtern_"/"_FileName
+ . . Set FileName=$TR($System.Encryption.Base64Encode(URLKey),"+="_$C(10,13),"_")_"LEV"_DocNr_".pdf"
+ . . Set Status=##class(BL.Flow.Levering.Doc).RenderAndFtpDoc(DocNr,$$$vHisieDownloadIntern,,FileName)
+ . . Set:($$$ISOK(Status)) DocURL=$$$vHisieDownloadExtern_"/"_FileName
;Prijslijst
Else If Toegang=$$$tgPrijsLijst Do
- . If RecordType=$$$rtPDF Do ; converteren van gearchiveerde prijslijst XML naar PDF
- .. Set XMLPad=$LG(##class(BL.Flow.PrijsLijst.Doc).ArchiveFullPathUser(KlantNr))
- .. Set FileName=$TR($System.Encryption.Base64Encode(URLKey),"+="_$C(10,13),"_")_"PL.pdf"
- .. Set Status=##class(BL.Flow.PrijsLijst.Doc).RenderAndFtpFromXML(XMLPad,$$$vHisieDownloadIntern,FileName)
- .. Set:($$$ISOK(Status)) DocURL=$$$vHisieDownloadExtern_"/"_FileName
- .. Set:($$$ISOK(Status)) DocURL="http://res.vanhoecke.be/cat/vanhoecke/pdf/test.pdf" ; tijdens test
- . Else If RecordType=$$$rtXML Do ; converteren van gearchiveerde prijslijst XML naar XML voor XLS
- .. Set XMLPad=$LG(##class(BL.Flow.PrijsLijst.Doc).ArchiveFullPathUser(KlantNr))
- .. Set FileName=$TR($System.Encryption.Base64Encode(URLKey),"+="_$C(10,13),"_")_"PL.xml"
- .. Set Status=##class(BL.Flow.PrijsLijst.Doc).TransformToXMLAndFtpFromXML(XMLPad,$$$vHisieDownloadIntern,FileName)
- .. Set:($$$ISOK(Status)) DocURL=$$$vHisieDownloadExtern_"/"_FileName
- .. Set:($$$ISOK(Status)) DocURL="http://res.vanhoecke.be/cat/vanhoecke/pdf/test.xml" ; tijdens test
- . Else If RecordType=$$$rtCHECK Do ; alleen controle of gearchiveerde prijslijst XML bestaat
- .. Set XMLPad=$LG(##class(BL.Flow.PrijsLijst.Doc).ArchiveFullPathUser(KlantNr))
- .. ;Set DocURL="NO DOC"
- .. Set:$L(XMLPad) DocURL="HAS DOC"
+ . If RecordType=$$$rtPDF Do
+ . . // Converteren van gearchiveerde prijslijst XML naar PDF
+ . . Set XMLPad=..GeefXMLPadVoorActuelePrijslijst(KlantNr)
+ . . Set FileName=$TR($System.Encryption.Base64Encode(URLKey),"+="_$C(10,13),"_")_"PL.pdf"
+ . . Set Status=##class(BL.Flow.PrijsLijst.Doc).RenderAndFtpFromXML(XMLPad,$$$vHisieDownloadIntern,,FileName)
+ . . Set:($$$ISOK(Status)) DocURL=$$$vHisieDownloadExtern_"/"_FileName
+ . . ;Set:($$$ISOK(Status)) DocURL="http://res.vanhoecke.be/cat/vanhoecke/pdf/test.pdf" ; tijdens test
+ . Else If RecordType=$$$rtXML Do
+ . . // Converteren van gearchiveerde prijslijst XML naar XML voor XLS
+ . . Set XMLPad=..GeefXMLPadVoorActuelePrijslijst(KlantNr)
+ . . Set FileName=$TR($System.Encryption.Base64Encode(URLKey),"+="_$C(10,13),"_")_"PL.xml"
+ . . Set Status=##class(BL.Flow.PrijsLijst.Doc).TransformToXMLAndFtpFromXML(XMLPad,$$$vHisieDownloadIntern,,FileName)
+ . . Set:($$$ISOK(Status)) DocURL=$$$vHisieDownloadExtern_"/"_FileName
+ . . ;Set:($$$ISOK(Status)) DocURL="http://res.vanhoecke.be/cat/vanhoecke/pdf/test.xml" ; tijdens test
+ . Else If RecordType=$$$rtCHECK Do
+ . . // Alleen controleren of er een gearchiveerde prijslijst XML bestaat
+ . . Set XMLPad=..GeefXMLPadVoorActuelePrijslijst(KlantNr)
+ . . Set KlantHeeftPrijslijst=($L(XMLPad)) && (KlantNr'=1000) ; Klant 1000 als test : geen prijslijst
+ . . Set DocURL=$S(KlantHeeftPrijslijst:"HAS DOC", 1:"NO DOC")
;Webshop
Else If Toegang=$$$tgWebShop Do
. $$$blFlowOfferte
. Set:'DocNr DocNr=%ECSession.PrevWebShopID ; onthouden omdat de flex app na goedvoor order geen WebShopId meer heeft
. Set objOfferte=%blFlowOfferte.Open(DocNr)
. If '$IsObject(objOfferte) Do Quit
- .. Set Status=$$$ERROR($$$GeneralError,"Offerte hoofding '"_DocNr_"' kan niet geopend worden.")
+ . . Set Status=$$$ERROR($$$GeneralError,"Offerte hoofding '"_DocNr_"' kan niet geopend worden.")
. Set Status=##class(BL.Flow.Offerte.Doc).ValidateFlowOfferte(objOfferte,KlantNr)
. Quit:($$$ISERR(Status))
. If %blFlowOfferte.IsVervallen() Do Quit
- .. Set InterfaceError=$$$Translate($$$errOfferteIsOngeldig)
- .. Set Status=$$$ERROR($$$GeneralError,"Offerte vervallen")
+ . . Set InterfaceError=$$$Translate($$$errOfferteIsOngeldig)
+ . . Set Status=$$$ERROR($$$GeneralError,"Offerte vervallen")
. If objOfferte.Controle="P" Do Quit
- .. Set Status=$$$ERROR($$$GeneralError,"Er zijn fouten opgetreden tijdens controle van offerte '"_DocNr_"' ("_objOfferte.Commentaar_").")
+ . . Set Status=$$$ERROR($$$GeneralError,"Er zijn fouten opgetreden tijdens controle van offerte '"_DocNr_"' ("_objOfferte.Commentaar_").")
. If RecordType=$$$rtPDF Do
- .. Set FileName=$TR($System.Encryption.Base64Encode(URLKey),"+="_$C(10,13),"_")_"F"_DocNr_".pdf"
- .. Set Status=##class(BL.Flow.Offerte.Doc).RenderAndFtpDoc(DocNr,$$$vHisieDownloadIntern,,FileName)
- .. Set:($$$ISOK(Status)) DocURL=$$$vHisieDownloadExtern_"/"_FileName
+ . . Set FileName=$TR($System.Encryption.Base64Encode(URLKey),"+="_$C(10,13),"_")_"F"_DocNr_".pdf"
+ . . Set Status=##class(BL.Flow.Offerte.Doc).RenderAndFtpDoc(DocNr,$$$vHisieDownloadIntern,,FileName)
+ . . Set:($$$ISOK(Status)) DocURL=$$$vHisieDownloadExtern_"/"_FileName
Else Do
. Set Status=$$$ERROR($$$GeneralError,"Toegang '"_Toegang_"' is onbekend")
@@ -3083,6 +3098,22 @@
]]>
+
+1
+KlantNr:%String
+%String
+
+
+
1
OrgalRef:%String,EdiNummer:%String,VHisieVwCust:%String