Index: AX/Uitgaand/EC/Data/impl/DocumentOphalen.cls.xml =================================================================== diff -u -r50353 -r58238 --- AX/Uitgaand/EC/Data/impl/DocumentOphalen.cls.xml (.../DocumentOphalen.cls.xml) (revision 50353) +++ AX/Uitgaand/EC/Data/impl/DocumentOphalen.cls.xml (.../DocumentOphalen.cls.xml) (revision 58238) @@ -44,26 +44,20 @@ Set %ECSession=##class(Derde.EC.Session).%New() Set %ECSession.Taal=%Taal If ((..Request.DocumentType = "Factuur") && (##class(TECH.StringUtils).StartsWith(..Request.DocumentId,"VF")||##class(TECH.StringUtils).StartsWith(..Request.DocumentId,"VC"))) || ((..Request.DocumentType = "Order")&& (##class(TECH.StringUtils).StartsWith(..Request.DocumentId,"VO"))){ - //#dim Bestandsnaam As %String = ##class(AXimpl.Dynamics.DocumentLocationOut.DocumentLocationService).%New().GeefBestandslocatie(..Request.DocumentId, ..Request.DocumentType) - //If $$$HasLength(Bestandsnaam){ - // Set ..DocURL = ##class(BL.EC.Data).%New().GetDocumentURLDirect(..Request.Header.SessieId,Bestandsnaam) - //} Else { - #dim Prefix As %String = $Select(..Request.DocumentType="Factuur":"Factuur", ..Request.DocumentType="Order":"OrderBvs", 1:"") - If Prefix '= "" { - Do GETFILES^vhDEV("\\FOP\fop\AX_PROD\",.files,Prefix_"_"_..Request.DocumentId_"*","F") - #dim DocUrl As %String = $Order(files(""), $Select(..Request.DocumentType="Factuur":1,1:-1)) + #dim DocumentType As AXimpl.Dynamics.DocumentLocationOut.enu.DocumentType = "" + Set DocumentType = ##class(AXimpl.Dynamics.DocumentLocationOut.enu.DocumentType).GeefValueViaDisplayValue(..Request.DocumentType) + + Set DocumentLocationService = ##class(AXimpl.Dynamics.DocumentLocationOut.DocumentLocationService).%New() + #dim DocUrl As %String = DocumentLocationService.GeefBestandslocatie(..Request.DocumentId, DocumentType ) + If DocUrl="" { Set ..DocURL = ##class(BL.EC.pxDocLink).Create("","","https://www.vanhoecke.be/sites/default/files/uploads/DocNotAvailable" _ $Select(..Request.Header.Taal="F":"FR",1:"")_".pdf") } else { Set ..DocURL = ##class(BL.EC.Data).%New().GetDocumentURLDirect(..Request.Header.SessieId,DocUrl) } - } - - //} } Else { Set ..DocURL = ##class(BL.EC.Data).%New().GetDocumentURL(..Request.Header.SessieId,..GeefDocumentType(),..GeefResultaatType(),..Request.DocumentId,..Request.Header.KlantId) - ;Do DumpObject^%apiOBJ(..Request) } ]]> Index: AXimpl/Dynamics/DocumentLocationOut/enu/DocumentType.cls.xml =================================================================== diff -u -r48321 -r58238 --- AXimpl/Dynamics/DocumentLocationOut/enu/DocumentType.cls.xml (.../DocumentType.cls.xml) (revision 48321) +++ AXimpl/Dynamics/DocumentLocationOut/enu/DocumentType.cls.xml (.../DocumentType.cls.xml) (revision 58238) @@ -45,6 +45,16 @@ + + +1 +DisplayValue:%String +%String + + Index: AXif/Dynamics/DocumentLocationOut/tns/ADUSalesInvoicePDFOutDC.cls.xml =================================================================== diff -u -r48312 -r58238 --- AXif/Dynamics/DocumentLocationOut/tns/ADUSalesInvoicePDFOutDC.cls.xml (.../ADUSalesInvoicePDFOutDC.cls.xml) (revision 48312) +++ AXif/Dynamics/DocumentLocationOut/tns/ADUSalesInvoicePDFOutDC.cls.xml (.../ADUSalesInvoicePDFOutDC.cls.xml) (revision 58238) @@ -24,6 +24,12 @@ 1 + +%String + + + + %String