Read_ReferencedDocument

Methode (Sub)

Read_ReferencedDocument ist eine Methode der Klasse Aloaha_ZUGFeRD.XML im Aloaha ZUGFeRD SDK.

Beschreibung (Originaltext der englischen SDK-Dokumentation): Reads a referenced document (buyer order, quotation, contract or ultimate customer order) of a line item.

Hinweis: If the position does not exist or no such reference is set, the output arguments keep their passed-in values (Nothing becomes an empty string).

Deklaration

Public Sub Read_ReferencedDocument(ByVal Doctype As iXML.WhichReferencedDocument, ByVal PositionNo As Long, ByRef IssuerAssignedID As String, ByRef ReferencedLineID As String, Optional ByRef IssueDateTime As String = "", Optional ByRef Document_DateFormat As String = "")

Parameter

NameTypPflichtBeschreibung
DoctypeiXML.WhichReferencedDocumenterforderlichWhich referenced document to read; GLOBAL_UltimateCustomerOrderReferencedDocument returns the last document-level ultimate customer order
PositionNoLongerforderlichZero-based index of the line item (must exist, also for the document-level type)
IssuerAssignedIDStringerforderlich(output) Number of the referenced document (falls back to its ID)
ReferencedLineIDStringerforderlich(output) Line/position reference within the referenced document
IssueDateTimeStringoptional (Standard: "")(output) Document date
Document_DateFormatStringoptional (Standard: "")(output) Date format code

Aufruf (VB.NET)

Dim alo As New Aloaha_ZUGFeRD.XML(Aloaha_ZUGFeRD.iXML.ZUGFeRDProfile.comfort, False, "IHR-LIZENZSCHLUESSEL")
Dim Doctype As iXML.WhichReferencedDocument = Nothing
Dim PositionNo As Long = 0
Dim IssuerAssignedID As String = ""
Dim ReferencedLineID As String = ""
alo.Read_ReferencedDocument(Doctype, PositionNo, IssuerAssignedID, ReferencedLineID)

Aufruf (C#)

var zfStandard = Aloaha_ZUGFeRD.iXML.ZUGFeRDVersion.xInvoice;   // Optional ByRef im Konstruktor: in C# mit ref übergeben
var alo = new Aloaha_ZUGFeRD.XML(Aloaha_ZUGFeRD.iXML.ZUGFeRDProfile.comfort, false, "IHR-LIZENZSCHLUESSEL", ref zfStandard);
Aloaha_ZUGFeRD.iXML.WhichReferencedDocument doctype = default;
long positionNo = 0;
string issuerAssignedID = "";
string referencedLineID = "";
string issueDateTime = "";
string document_DateFormat = "";
alo.Read_ReferencedDocument(doctype, positionNo, ref issuerAssignedID, ref referencedLineID, ref issueDateTime, ref document_DateFormat);

COM-Schnittstelle

Read_ReferencedDocument ist Mitglied der Schnittstelle Aloaha_ZUGFeRD.iXML (Position 231 von 343) und damit auch aus VB6, VBA/Access und anderen COM-Clients über CreateObject("Aloaha_ZUGFeRD.XML") aufrufbar. Neue Mitglieder werden immer am Ende von iXML angefügt, damit bestehende COM-Clients unverändert weiterlaufen; nach einem Update die Typbibliothek neu registrieren.

Quelle: XML-Dokumentationskommentare des Aloaha ZUGFeRD SDK (xml.vb). Gleiche Signatur in VB6/VBA über COM. In C# werden ByRef-Parameter mit ref übergeben, VB-Eigenschaften mit Parametern heißen get_…/set_…, optionale Parameter können entfallen.