API-Referenz

299 Methoden und Eigenschaften des Aloaha ZUGFeRD SDK – mit Signatur aus dem Quellcode, Beschreibung aus der SDK-Dokumentation (230 mit eigener Seite) und den zugehörigen Codebeispielen.

A B C D E F G I K L M O P R S T U V W Z
A

ActualDeliveryDate

Field ActualDeliveryDate

BT-72: ActualDeliverySupplyChainEvent. Details →

ActualDeliveryDateItem

Property ActualDeliveryDateItem

BT-X-85: Detailed information about the actual delivery of an item Details →

Add_AdditionalReferencedDocument

Sub Add_AdditionalReferencedDocument(ByVal IssuerAssignedID As String, ByVal URIID As String, Optional ByVal TypeCode As String = "916", Optional ByVal Name As String = "", Optional ByVal MimeCode As String = "", Optional ByVal FileName As String = "", Optional ByVal IssueDateTime As String = "", Optional ByVal Document_DateFormat As String = "", Optional ByVal ReferenceTypeCode As String = "", Optional ByVal MimeType As String = "")

BG-24: Adds a new document-level AdditionalReferencedDocument (supporting document, tender/lot or invoiced object reference). Upgrades a Basic profile to Comfort (EN 16931). Details →

Add_AdditionalReferencedFile

Function Add_AdditionalReferencedFile(ByVal FilePath As String, ByVal IssuerAssignedID As String, ByVal URIID As String, Optional ByVal TypeCode As String = "916", Optional ByVal Name As String = "", Optional ByVal ReferenceTypeCode As String = "", Optional ByVal IssueDateTime As String = "", Optional ByVal Document_DateFormat As String = "", Optional ByVal MimeType As String = "")

BG-24: Embeds a file from disk (Base64) as a document-level additional supporting document (ram:AdditionalReferencedDocument). Calls Add_AdditionalReferencedDocument internally. Upgrades a Basic profile to Comfort (EN 16931). Details →

Add_Invoice_Document_Note

Sub Add_Invoice_Document_Note(ByVal Content As String, ByVal SubjectCode As String)

BG-1: Adds an invoice note (BT-22) with optional subject code (BT-21) on document level. Existing notes are kept; the new note is appended. Nothing is added if Content is empty. Details →

Add_ReferencedDocument

Function Add_ReferencedDocument(ByVal Doctype As iXML.WhichReferencedDocument, ByVal PositionNo As Long, ByVal IssuerAssignedID As String, ByVal ReferencedLineID As String, Optional ByVal IssueDateTime As String = "", Optional ByVal Document_DateFormat As String = "")

BT-132-00, BG-X-47, BG-X-2: Referenced documents on item level (buyer order, quotation, contract, ultimate customer order). Replaces the existing reference of that type on the line item and sets the profile to Extended. Details →

Add_ReferencedDocumentVBA

Function Add_ReferencedDocumentVBA(ByVal Doctype As Integer, ByVal PositionNo As Integer, ByVal IssuerAssignedID As String, ByVal ReferencedLineID As String, ByVal IssueDateTime As String, ByVal Document_DateFormat As String)

VBA/COM-friendly variant of Add_ReferencedDocument taking the document type as Integer. Adds a referenced document (order, quotation, contract, ultimate customer order) to a line item. Details →

Add_ReferencedFile

Function Add_ReferencedFile(ByVal ReferencedFileType As iXML.WhichReferencedFile, ByVal PositionNO As Long, ByVal FilePath As String, ByVal IssuerAssignedID As String, ByVal URIID As String, ByVal LineID As String, ByVal TypeCode As String, Optional ByVal Name As String = "", Optional ByVal ReferenceTypeCode As String = "", Optional ByVal IssueDateTime As String = "", Optional ByVal Document_DateFormat As String = "", Optional ByVal MimeType As)

Embeds a file from disk (Base64) as an additional referenced document of a line item (ram:AdditionalReferencedDocument in the line trade agreement). Only ReferencedFileType LineItem_AdditionalReferencedDocument is currently stored. Always sets the profile to Extended. Details →

Add_ReferencedFileVBA

Function Add_ReferencedFileVBA(ByVal ReferencedFileType As Integer, ByVal PositionNO As Integer, ByVal FilePath As String, ByVal IssuerAssignedID As String, ByVal URIID As String, ByVal LineID As String, ByVal TypeCode As String, ByVal Name As String, ByVal ReferenceTypeCode As String, ByVal IssueDateTime As String, ByVal Document_DateFormat As String, ByVal MimeType As String)

VBA/COM friendly variant of Add_ReferencedFile using an Integer reference type: embeds a file as referenced document of a line item. The file is read, Base64 encoded and stored with file name and name. The MIME type is always looked up from the Windows registry by file extension. Sets the profile to EXTENDED. Details →

Add_SpecifiedLineTradeSettlement_AdditionalReferencedDocument

Function Add_SpecifiedLineTradeSettlement_AdditionalReferencedDocument(ByVal PositionNO As Integer, ByVal TypeCode As String, Optional ByVal IssuerAssignedID As String = "", Optional ByVal ReferenceTypeCode As String = "")

BT-128: Adds an additional referenced document (e.g. invoice line object identifier) to the line trade settlement of a line item. Details →

Add_SpecifiedLineTradeSettlement_InvoiceReferencedDocument

Function Add_SpecifiedLineTradeSettlement_InvoiceReferencedDocument(ByVal PositionNO As Integer, ByVal IssuerAssignedID As String, ByVal TypeCode As String, Optional ByVal IssueDateTime As String = "", Optional ByVal Document_DateFormat As String = "")

Sets the invoice referenced document (ram:InvoiceReferencedDocument) in the line trade settlement of a line item. Replaces any previously set line-level invoice reference of that position. Details →

Add_SpecifiedLineTradeSettlement_ReceivableSpecifiedTradeAccountingAccount

Function Add_SpecifiedLineTradeSettlement_ReceivableSpecifiedTradeAccountingAccount(ByVal PositionNO As Integer, ByVal ID As String, Optional ByVal TypeCode As String = "")

BT-133: Adds a buyer accounting reference (ReceivableSpecifiedTradeAccountingAccount) to the line trade settlement of a line item. Details →

Add_Trade_ItemTradeNote

Function Add_Trade_ItemTradeNote(ByVal ItemIndex As Integer, ByVal Content As String, Optional ByVal ContentCode As String = "", Optional ByVal SubjectCode As String = "")

BT-127, BT-X-9, BT-X-10: Adds a note to an invoice line. Details →

AddAdditionalReferencedDocument

Sub AddAdditionalReferencedDocument(ByVal ID As String, ByVal ReferenceTypeCode As String, Optional ByVal IssueDateTime As String = "", Optional ByVal Document_DateFormat As String = "", Optional ByVal LineID As String = "")

BG-24: Adds a document-level additional referenced document with ID and type code (no attachment). Upgrades a Basic profile to Comfort (EN 16931). Details →

addApplicableProductCharacteristics

Function addApplicableProductCharacteristics(ByVal ProductIndex As Integer, ByVal Description As String, ByVal Value As String, Optional ByVal TypeCode As String = "", Optional ByVal ValueMeasure As String = "", Optional ByVal ValueMeasureUnitCode As String = "")

BG-32: Adds an item attribute (ApplicableProductCharacteristic) to a line item. Details →

AddAttachments2PDF

Function AddAttachments2PDF(ByVal InputPDF As String, ByVal AttachmentFileList() As String, ByVal OutPutPDF As String, ByVal DoOverWrite As Boolean, ByVal Licensekey As String)

Embeds one or more files as attachments into a PDF file. Details →

AddBuyerOrderReferencedDocument

Sub AddBuyerOrderReferencedDocument(ByVal IssuerAssignedID As String, ByVal DocumentDate As String, ByVal DocumentDateFormat As String, Optional ByVal DocumentID As String = "", Optional ByVal LineID As String = "")

BT-13: Sets the purchase order reference (BuyerOrderReferencedDocument) including document ID, date and line. Details →

AddDeliveryNote

Sub AddDeliveryNote(ByVal DocumentID As String, ByVal DocumentDate As String, ByVal DocumentDateFormat As String, Optional ByVal LineID As String = "")

BG-X-83: Sets the delivery note reference (DeliveryNoteReferencedDocument) on document level, or on a line item if LineID is given. Details →

AddDeliveryNoteItem

BG-X-83: Sets the delivery note reference (DeliveryNoteReferencedDocument) on a line item, with an explicit delivery note line number. Details →

addDesignatedProductClassification

Sub addDesignatedProductClassification(ByVal Index As Integer, ByVal ClassCode As String, ByVal listID As String, ByVal listVersionID As String, Optional ByVal ClassName As String = "")

BT-158-00: Adds an item classification to an invoice line. Details →

AddFile2Attach

Sub AddFile2Attach(ByVal FilePath As String)

Adds a file to the list of additional files to be embedded as attachments (see Files2Attach). Details →

AddInvoiceeTradePartyTAX

Sub AddInvoiceeTradePartyTAX(ByVal TAXNumber As String, ByVal TAXType As String)

Adds a tax registration (SpecifiedTaxRegistration) to the invoicee party (InvoiceeTradeParty). Details →

AddInvoiceReferencedDocument

Sub AddInvoiceReferencedDocument(ByVal IssuerAssignedID As String, ByVal ReferenceTypeCode As String, Optional ByVal IssueDateTime As String = "", Optional ByVal Document_DateFormat As String = "102")

BG-3: Adds InvoiceReferencedDocument - Preceding Invoice Reference Details →

AddItemAllowanceBasisAmount

Sub AddItemAllowanceBasisAmount(ByVal Itemno As Integer, ByVal AllowanceBasisAmount As String)

Sets the base amount of the item price discount / charge (on the gross price) of an invoice line. Details →

AddItemAllowancePercent

Sub AddItemAllowancePercent(ByVal Itemno As Integer, ByVal AllowancePercent As String)

Sets the percentage of the item price discount / charge (on the gross price) of an invoice line. Details →

AddItemIncludedTradeTax

Sub AddItemIncludedTradeTax(ByVal ItemIndex As Integer, ByVal CalculatedAmount As String, ByVal TypeCode As String, ByVal CategoryCode As String, ByVal RateApplicablePercent As String, Optional ByVal ExemptionReason As String = "", Optional ByVal ExemptionReasonCode As String = "")

Included tax for B2C per item / BG-X-4 Details →

addItemSpecifiedTradeAllowanceCharge

Function addItemSpecifiedTradeAllowanceCharge(ByVal ItemIndex As Integer, ByVal isCharge As Boolean, ByVal CalculationPercent As String, ByVal BasisAmount As String, ByVal ActualAmount As String, ByVal ReasonCode As String, ByVal Reason As String)

BG-27, BG-28: Adds an allowance or charge to an invoice line. Details →

AdditionalReferencedDocumentCount

Function AdditionalReferencedDocumentCount()

BG-24: Returns the number of document-level additional referenced documents (ram:AdditionalReferencedDocument). Details →

AdditionalReferencedFileCount

Function AdditionalReferencedFileCount()

Returns the number of additional referenced documents on document level (e.g. BG-24 supporting documents). Details →

AddLogisticsServiceCharge

Sub AddLogisticsServiceCharge(ByVal Description As String, ByVal AppliedAmount As String, ByVal AppliedAmountCurrencyID As String, ByVal TypeCode As String, ByVal CategoryCode As String, ByVal ApplicablePercent As String)

Add detailed information on logistics service fees Details →

AddMonetarySummation

Sub AddMonetarySummation(ByVal Amount As String, ByVal SummationType As iXML.SummationType, Optional ByVal CurrencyID As String = "")

BG-22: Sets a document total amount. Details →

AddPaymentMeans

Sub AddPaymentMeans(ByVal Payment_Type As iXML.Payment_Means, ByVal Comment As String, ByVal FinancialAccount_IBANID As String, Optional ByVal AccountName As String = "", Optional ByVal FinancialAccount_ProprietaryID As String = "", Optional ByVal BICID As String = "", Optional ByVal GermanBankleitzahlID As String = "", Optional ByVal BankName As String = "", Optional ByVal isDirectDebit As Boolean = False, Optional ByVal DirectDebitID )

BG-16: Adds a payment instruction (SpecifiedTradeSettlementPaymentMeans) to the invoice. Overload taking the payment means type as enumeration; calls the String overload. Details →

AddPaymentMeansCard

Sub AddPaymentMeansCard(ByVal Payment_Type As iXML.Payment_Means, ByVal Comment As String, ByVal CardNumber As String, ByVal CardholderName As String)

BG-18: Adds a card payment instruction (payment means with SpecifiedTradeSettlementFinancialCard). Overload taking the payment means type as enumeration; calls the String overload. Details →

AddProduct_Basic

Function AddProduct_Basic(ByVal BilledQuantity As String, ByVal QuantityUnit As String, ByVal ProductName As String, Optional ByVal ProductDescription As String = "", Optional ByVal GrossPrice As String = "", Optional ByVal NetPrice As String = "", Optional ByVal NetPriceBasisQuantity As String = "", Optional ByVal CurrencyID As String = "")

BG-25: Adds a new invoice line with quantity, name, description and optional gross / net price. Details →

AddProduct_Comfort

Function AddProduct_Comfort(ByVal PositionID As Integer, ByVal Note As String, ByVal SellerAssignedID As String, ByVal BilledQuantity As String, ByVal QuantityUnit As String, ByVal ProductName As String, ByVal ProductDescription As String, ByVal GrossPrice As String, ByVal GrossPriceCurrency As String, ByVal BasisQuantity As String, ByVal BasisQuantityUnitCode As String, ByVal AllowanceChargeIndicator As Boolean, ByVal AllowanceAmount As Strin)

BG-25: Adds an invoice line with prices, item price discount / charge, VAT information and line net amount, using a string line ID. Details →

AddProduct_Comfort_Quick

Function AddProduct_Comfort_Quick(ByVal PositionID As String, ByVal ProductName As String, ByVal ProductDescription As String, ByVal ProductCode As String, ByVal ProductNote As String, ByVal BilledQuantity As Double, ByVal QuantityUnit As String, ByVal GrossPrice_Per_Unit As Double, ByVal CurrencyID As String, ByVal Discount_per_Unit As Double, ByVal DiscountText As String, Optional ByVal TAXPercent As String = "", Optional ByVal TaxTypeCode As Strin)

BG-25: Adds an invoice line with simplified parameters (gross price, optional per-unit discount, VAT). The line ID (BT-126) is assigned automatically. Details →

AddSellerAssignedID

Sub AddSellerAssignedID(ByVal SellerAssignedID As String, Optional ByVal DocumentDate As String = "", Optional ByVal DocumentDateFormat As String = "")

BT-14: Sets the sales order reference (SellerOrderReferencedDocument). Details →

AddSellerTAX

Sub AddSellerTAX(ByVal TAXNumber As String, ByVal TAXType As String)

BT-31, BT-32: Adds a tax registration (SpecifiedTaxRegistration) to the seller. Details →

AddShipFromTradePartyTAX

Sub AddShipFromTradePartyTAX(ByVal TAXNumber As String, ByVal TAXType As String)

BT-X-199: Adds a tax registration (SpecifiedTaxRegistration) to the ship-from party (ShipFromTradeParty). Details →

AddShipToTradePartyGlobalID

Sub AddShipToTradePartyGlobalID(ByVal IDVal As String, ByVal IDType As String)

BT-71: Sets the global identifier of the deliver-to location (ShipToTradeParty GlobalID). Details →

AddShipToTradePartyTAX

Sub AddShipToTradePartyTAX(ByVal TAXNumber As String, ByVal TAXType As String)

BT-X-161: Adds a tax registration (SpecifiedTaxRegistration) to the ship-to party (ShipToTradeParty). Details →

AddSpecifiedAdvancePayment

Sub AddSpecifiedAdvancePayment(ByVal PaidAmount As String, ByVal CalculatedTAXAmount As String, Optional ByVal ReceivedDate As String = "", Optional ByVal ReceivedDateFormat As String = "102", Optional ByVal TAXRatePercent As String = "", Optional ByVal TAXExemptionReason As String = "", Optional ByVal TAXTypeCode As String = "VAT", Optional ByVal TAXCategoryCode As String = "S", Optional ByVal InvoiceNumber As String = "", Optional ByVal TypeCode)

Adds an advance payment (SpecifiedAdvancePayment) with its included tax and an optional reference to the advance payment invoice. Details →

AddTradeAllowanceCharge

Sub AddTradeAllowanceCharge(ByVal ChargeIndicator As Boolean, ByVal BasisAmount As String, ByVal BasisAmountCurrencyID As String, ByVal ActualAmount As String, ByVal ActualAmountCurrencyID As String, ByVal TypeCode As String, ByVal CategoryCode As String, ByVal TAXRateApplicablePercent As String, Optional ByVal Reason As String = "", Optional ByVal CalculationPercent As String = "", Optional ByVal ReasonCode As String = "", Optional ByVal Seque)

Adds Document level allowances / charges BG-20, BG-21 Details →

AddTradePaymentTerms

Sub AddTradePaymentTerms(ByVal Description As String, Optional ByVal DueDate As String = "", Optional ByVal DueDateFormat As String = "", Optional ByVal DirectDebitMandateID As String = "", Optional ByVal PeriodUnit As String = "", Optional ByVal Period As String = "", Optional ByVal DiscountPercent As String = "", Optional ByVal DiscountAmount As String = "", Optional ByVal BasisOfDiscountAmount As String = "")

Adds a new payment terms entry (SpecifiedTradePaymentTerms). Details →

AddTradeTax

Sub AddTradeTax(ByVal CalculatedAmount As String, ByVal CalculatedAmountCurrencyID As String, ByVal BasisAmount As String, ByVal BasisAmountCurrencyID As String, ByVal TypeCode As String, ByVal CategoryCode As String, ByVal ApplicablePercent As String, Optional ByVal ExemptionReason As String = "", Optional ByVal TaxPointDate As String = "", Optional ByVal TaxPointDateFormat As String = "", Optional ByVal DueDateTypeCode As String =)

BG-23: Add VAT BREAKDOWN Details →

ApplicableProductCharacteristicsCount

Property ApplicableProductCharacteristicsCount

BG-32 Count of ApplicableProductCharacteristics Details →

Ascii2PDF

Function Ascii2PDF(ByVal AsciiText As String, Optional ByVal OutputFile As String = "", Optional ByVal Font_name As String = "", Optional ByVal Font_Size As Double = 0, Optional ByVal Line_Distance As Double = 0, Optional ByVal LetterHeadPath As String = "", Optional ByVal LetterheadOnFirstPageOnly As Boolean = False)

Creates a PDF from plain text using the Aloaha PDF engine, optionally with a letterhead PDF as background. Details →

AssemblyVersion

Function AssemblyVersion()

Returns the version of the ZUGFeRD SDK assembly. Details →

B

BuyerFAX

Property BuyerFAX

BT-X-115-00 Fax Number of Buyer. Note: Switches Profile to EXTENDED Details →

BuyerLegalID

Property BuyerLegalID

BuyerLegalID (for example HRZ) is BT-47 Details →

BuyerTradingBusinessName

Property BuyerTradingBusinessName
C

CategoryCode

Field CategoryCode

Check18Digits

Sub Check18Digits(ByRef inputnumber As String)

Normalizes a numeric string longer than 17 characters so that it has at most 18 significant digits: thousands separators, spaces and apostrophes are removed, leading/trailing zeros dropped and the fraction rounded if needed. Details →

CheckPDFTextAgainstXML

Rough plausibility check of a hybrid invoice PDF (ZUGFeRD / Factur-X / XRechnung): are grand total (BT-112), amount due (BT-115), net total (BT-109), VAT total (BT-110), invoice number (BT-1) and IBAN (BT-84) of the embedded XML also printed on the PDF pages? Legally the XML counts, but people usually read the PDF - a PDF that shows other values than the XML is a mistake or a fraud attempt. Details →

CloseAll

Sub CloseAll()

Releases the PDF loaded with LoadPDF2Mem and clears the cached attachment list. Details →

ConvertDOCX2PDF

Function ConvertDOCX2PDF(ByVal Input_DOCX_Path As String, Optional ByRef Output_PDF_Path As String = "", Optional ByVal DoOverWrite As Boolean = True, Optional ByVal Licensekey As String = "", Optional ByVal ConverDecimalDot2Comma As Boolean = False)

Converts a DOCX, DOC or RTF file to PDF. Details →

convertFormsdateToCII

Function convertFormsdateToCII(ByVal FormDate As String)

Converts a date string in format dd.MM.yyyy (or any format accepted by convertUBLdateToCII) to the CII format 102 (YYYYMMDD). Details →

ConvertPDF2PDFA

Function ConvertPDF2PDFA(ByVal InputPDF As String, ByVal OutputPDF As String, ByVal Licensekey As String, Optional ByVal ConverDecimalDot2Comma As Boolean = False)

Converts a PDF file to PDF/A. If the input is a .docx file it is converted to PDF via ConvertDOCX2PDF instead. Details →

convertUBLdateToCII

Function convertUBLdateToCII(ByVal UBLDate As String)

Converts a date string (e.g. UBL format YYYY-MM-DD) to the CII format 102 (YYYYMMDD). Details →

Create_Invoice

Sub Create_Invoice(ByVal InvoiceID As String, Optional ByVal InvoiceNote As String = "", Optional ByVal InvoiceDate As String = "", Optional ByVal InvoiceDateFormat As String = "", Optional ByVal InvoiceName_FreeText As String = "", Optional ByVal InvoiceLanguageID_2Letter_ISO As String = "", Optional ByVal CurrencyID As String = "")

Starts a new invoice: replaces the invoice data currently held by this object with a new, empty invoice (type 380) and sets invoice number, date, note, name, language and currency. Same as CreateInvoice, but without return value. Details →

CreateCSV

Function CreateCSV(Optional ByRef SellerPath As String = "", Optional ByRef BuyerPath As String = "", Optional ByRef ItemsPath As String = "", Optional ByRef TotalsPath As String = "", Optional ByRef AllowancesPath As String = "", Optional ByVal DoOverWriteFiles As Boolean = False, Optional ByVal Seperator_Char As String = ",")

Exports the current invoice into five CSV data sets: seller, buyer, line items, totals and document level allowances/charges (format as used by ImportCSV; see ReadTradeItemCSV, ReadTotalsCSV, ReadTradeAllowanceChargesCSV). Details →

CreateDocFromXML

Function CreateDocFromXML(ByVal XMLPath As String, ByVal OutputDocPath As String, Optional ByRef DocxTemplatePath As String = "", Optional ByVal Licensekey As String = "", Optional ByVal DoOverWrite As Boolean = True, Optional ByVal AdditionalAttachment As String = "", Optional ByVal ConverDecimalDot2Comma As Boolean = False)

Creates a visual invoice (DOCX or PDF) from a ZUGFeRD / Factur-X / XRechnung XML file using a DOCX template. If the output is a PDF, the XML is also embedded into it (PDF/A-3 hybrid invoice) via MergeXMLIntoPDF. Details →

CreateInvoice

Function CreateInvoice(ByVal InvoiceID As String, Optional ByVal InvoiceNote As String = "", Optional ByVal InvoiceDate As String = "", Optional ByVal InvoiceDateFormat As String = "", Optional ByVal InvoiceName_FreeText As String = "", Optional ByVal InvoiceLanguageID_2Letter_ISO As String = "", Optional ByVal CurrencyID As String = "")

Creates a new invoice object (document type 380, invoice) and makes it the current invoice data of this object, replacing any previously set or loaded data. Sets BT-1, BT-2, BT-5, the optional note (BT-22), document name and language. Details →

CreateInvoiceObject

Function CreateInvoiceObject(ByVal InvoiceID As String, Optional ByVal InvoiceNote As String = "", Optional ByVal InvoiceDate As String = "", Optional ByVal InvoiceDateFormat As String = "", Optional ByVal InvoiceName_FreeText As String = "", Optional ByVal InvoiceLanguageID_2Letter_ISO As String = "", Optional ByVal CurrencyID As String = "")

Starts a new invoice like CreateInvoice and returns the new invoice structure as Object (for COM / late-bound callers). The invoice data currently held by this object is replaced. Details →

CreateNewInvoice

Function CreateNewInvoice(ByVal InvoiceID As String, Optional ByVal InvoiceNote As String = "", Optional ByVal InvoiceDate As String = "", Optional ByVal InvoiceDateFormat As String = "", Optional ByVal InvoiceName_FreeText As String = "", Optional ByVal InvoiceLanguageID_2Letter_ISO As String = "", Optional ByVal CurrencyID As String = "")

Starts a new invoice like CreateInvoice and reports success as Boolean. The invoice data currently held by this object is replaced. Details →

D

Dispose

Sub Dispose()

Releases resources: restores the locale, resets the GC latency mode, removes the unhandled-exception handler and unloads the internal PDF object. Details →

DocumentNotesCount

Property DocumentNotesCount

DoStartupWork

Sub DoStartupWork()

Runs the start-up initialisation of the PDF component (calls PDF.DoStartupWork). Errors are ignored. Details →

E

EightAfterKommaDigitsfor4

Field EightAfterKommaDigitsfor4

ElectronicAddressSchemeFromString

Function ElectronicAddressSchemeFromString(ByVal s As String)

Converts an electronic address scheme code (EAS, e.g. 0088, 0204, 9930) into the ElectronicAddressSchemes enum (BT-34-1, BT-49-1). Details →

ElectronicAddressSchemeToString

Function ElectronicAddressSchemeToString(ByVal eas As iXML.ElectronicAddressSchemes)

Converts an ElectronicAddressSchemes enum value into its electronic address scheme code (EAS) string, e.g. LeitwegID to 0204 (BT-34-1, BT-49-1). Details →

EnableXmlSerializationCompileSwitch

Sub EnableXmlSerializationCompileSwitch(Optional ByVal Level As Integer = -1)

Diagnostics: sets the .NET trace switch XmlSerialization.Compile to the given level. Details →

ExportZUGFeRDXML2Disk

Function ExportZUGFeRDXML2Disk(ByVal InputPDFPath As String, ByVal OutputXMLPath As String, Optional ByVal Licensekey As String = "", Optional ByVal DoOverwrite As Boolean = False)

Extracts the embedded ZUGFeRD / Factur-X / XRechnung XML from a PDF and saves it to disk. Details →

ExtractXML

Function ExtractXML(ByVal InvoicePath As String)

Extracts the embedded ZUGFeRD / Factur-X XML from a PDF invoice and returns it as text. Details →

F

FileAttachments

Function FileAttachments(ByVal InputPDF As String, Optional ByVal OwnwerPass As String = "", Optional ByVal ForceLiveCycleMode As Boolean = False, Optional ByVal Licensekey As String = "")

Extracts all embedded file attachments of a PDF. Details →

ForceEN16931Guideline

Writes EN 16931 or XRechnung 3.0 as specification identifier (BT-24) although the invoice uses fields that switched the profile to Factur-X EXTENDED. For receivers that accept only EN 16931 or XRechnung. Call it after all other calls and right before SaveXML. The EXTENDED fields stay in the XML. Details →

G

get_SpecifiedLineTradeSettlement_AdditionalReferencedDocument

Sub get_SpecifiedLineTradeSettlement_AdditionalReferencedDocument(ByVal PositionNO As Integer, ByVal ID As Integer, ByRef TypeCode As String, Optional ByRef IssuerAssignedID As String = "", Optional ByRef ReferenceTypeCode As String = "")

BT-128: Reads an additional referenced document (invoice line object identifier) from the line trade settlement of a line item. Details →

get_SpecifiedLineTradeSettlement_InvoiceReferencedDocument

Sub get_SpecifiedLineTradeSettlement_InvoiceReferencedDocument(ByVal PositionNO As Integer, ByRef IssuerAssignedID As String, ByRef TypeCode As String, Optional ByRef IssueDateTime As String = "", Optional ByRef Document_DateFormat As String = "")

Reads the invoice referenced document (ram:InvoiceReferencedDocument) from the line trade settlement of a line item. Details →

Get_SpecifiedLineTradeSettlement_ReceivableSpecifiedTradeAccountingAccount

Sub Get_SpecifiedLineTradeSettlement_ReceivableSpecifiedTradeAccountingAccount(ByVal PositionNO As Integer, ByVal ItemNo As Integer, ByRef ID As String, Optional ByRef TypeCode As String = "")

BT-133: Reads a buyer accounting reference (ReceivableSpecifiedTradeAccountingAccount) of a line item. Details →

get_URIUniversalCommunication

Function get_URIUniversalCommunication(Optional ByVal UseSeller As Boolean = True, Optional ByRef schemeID As String = "")

BT-34, BT-49: Reads the electronic address of the seller or buyer. Details →

GetActualDeliveryDate

Sub GetActualDeliveryDate(ByRef OccurrenceDateTime As String, Optional ByRef Format As String = "102")

BT-72: Reads the actual delivery date (ram:ActualDeliverySupplyChainEvent/ram:OccurrenceDateTime). Details →

GetAdditionalReferencedFile

Function GetAdditionalReferencedFile(ByVal Index As Integer, ByRef ID As String, ByRef FileName As String, ByRef MimeType As String, ByRef IssuerAssignedID As String, Optional ByRef LineID As String = "", Optional ByRef TypeCode As String = "", Optional ByRef ReferenceTypeCode As String = "", Optional ByRef Document_Date As String = "", Optional ByRef Name As String = "")

Reads an additional referenced document on document level (e.g. BG-24 supporting document) and its embedded attachment. Details →

getApplicableProductCharacteristics

Sub getApplicableProductCharacteristics(ByVal ProductIndex As Integer, ByVal CharacteristicsIndex As Integer, ByRef Description As String, ByRef Value As String, Optional ByRef TypeCode As String = "", Optional ByRef ValueMeasure As String = "", Optional ByRef ValueMeasureUnitCode As String = "")

BG-32: Reads an item attribute (ApplicableProductCharacteristic) of a line item. Details →

GetBillingPeriod

Sub GetBillingPeriod(ByRef StartDateTime As String, ByRef EndDateTime As String, Optional ByRef DateFormat As String = "102")

BG-14: Reads the invoicing period. Details →

GetCompleteDate

Sub GetCompleteDate(ByRef CompleteDateTime As String, Optional ByRef Format As String = "102")

Reads the complete date of the document (ram:CompleteDateTime in the exchanged document header). Details →

GetContractReferencedDocument

Sub GetContractReferencedDocument(ByRef IssuerAssignedID As String, Optional ByRef DocumentDate As String = "", Optional ByRef DocumentDateFormat As String = "")

BT-12: Reads the contract reference (ContractReferencedDocument). Details →

getDeliveryNoteReferencedDocument

Function getDeliveryNoteReferencedDocument(Optional ByRef FormattedIssueDateTime As String = "", Optional ByRef Format As String = "")

Returns the delivery note reference (ram:DeliveryNoteReferencedDocument). Details →

getDespatchAdviceReferencedDocument

Function getDespatchAdviceReferencedDocument(Optional ByRef FormattedIssueDateTime As String = "", Optional ByRef Format As String = "")

BT-16: Returns the despatch advice reference (ram:DespatchAdviceReferencedDocument). Details →

getDocumentNote

Sub getDocumentNote(ByVal Index As Integer, ByRef Content As String, Optional ByRef ContentCode As String = "", Optional ByRef SubjectCode As String = "")

BG-1: Reads an invoice note by index. Details →

GetElectronicAddressSchemeNameFromValue

Function GetElectronicAddressSchemeNameFromValue(ByVal value As String)

Returns the ElectronicAddressSchemes enum member name for a numeric value given as string. Details →

GetFileAsMemoryStream

Function GetFileAsMemoryStream(ByRef FileName As String)

Reads a file into a MemoryStream. Details →

GetInvoiceReferencedDocument

Sub GetInvoiceReferencedDocument(ByVal Index As Integer, ByRef InvoiceReferencedDocument As String, ByRef InvoiceReferencedDocumentDate As String, Optional ByRef InvoiceReferencedDocumentDateFormat As String = "", Optional ByRef TypeCode As String = "")

BG-3: Reads a preceding invoice reference (InvoiceReferencedDocument) by index. Details →

getItemSpecifiedTradeAllowanceCharge

Sub getItemSpecifiedTradeAllowanceCharge(ByVal ItemIndex As Integer, ByVal ChargeIndex As Integer, ByRef isCharge As Boolean, Optional ByRef CalculationPercent As String = "", Optional ByRef BasisAmount As String = "", Optional ByRef ActualAmount As String = "", Optional ByRef ReasonCode As String = "", Optional ByRef Reason As String = "")

BG-27, BG-28: Reads an allowance or charge of an invoice line. Details →

getItemSpecifiedTradeAllowanceChargeCount

Function getItemSpecifiedTradeAllowanceChargeCount(ByVal ItemIndex As Integer)

BG-27, BG-28: Returns the number of allowances and charges of an invoice line. Details →

GetItemTradeTax

Sub GetItemTradeTax(ByVal ItemIndex As Integer, ByRef RateApplicablePercent As String, ByRef CategoryCode As String, Optional ByRef Reason As String = "", Optional ByRef ExemptionReasonCode As String = "", Optional ByRef CalculatedAmount As String = "", Optional ByRef TypeCode As String = "")

BG-30: Reads the VAT information of an invoice line. Details →

GetLineItemReferencedDocument

Function GetLineItemReferencedDocument(ByVal LineIndex As Integer, ByRef URIID As String, ByRef FileName As String, ByRef MimeType As String, ByRef IssuerAssignedID As String, Optional ByRef LineID As String = "", Optional ByRef TypeCode As String = "", Optional ByRef ReferenceTypeCode As String = "", Optional ByRef Document_Date As String = "")

Reads the referenced document with embedded attachment of a line item. Details →

GetLogisticsServiceCharge

Sub GetLogisticsServiceCharge(ByVal Index As Integer, ByRef Description As String, ByRef AppliedAmount As String, ByRef AppliedAmountCurrencyID As String, ByVal TypeCode As String, ByRef CategoryCode As String, ByRef ApplicablePercent As String)

Reads a logistics service charge of the document. Details →

GetObjectData

Sub GetObjectData(ByVal info As System.Runtime.Serialization.SerializationInfo, ByVal context As System.Runtime.Serialization.StreamingContext)

ISerializable implementation: sets the serialized type name to Aloaha_ZUGFeRD.xml. No invoice data is serialized. Details →

GetPayeeTradeParty

Sub GetPayeeTradeParty(Optional ByRef ID As String = "", Optional ByRef GlobalID As String = "", Optional ByRef GlobalIDScheme As String = "", Optional ByRef CompanyName As String = "", Optional ByRef RoleCode As String = "", Optional ByRef VAT As String = "", Optional ByRef PersonName As String = "", Optional ByRef DepartmentName As String = "", Optional ByRef PhoneNumber As String = "", Optional ByRef FAXNumber As String = "", Optional B)

BG-10: Reads the payee (PayeeTradeParty) of the invoice. All arguments are outputs; values not present are returned as empty strings. Details →

getReceivingAdviceReferencedDocument

Function getReceivingAdviceReferencedDocument(Optional ByRef FormattedIssueDateTime As String = "", Optional ByRef Format As String = "")

BT-15: Returns the receiving advice reference (ram:ReceivingAdviceReferencedDocument). Details →

GetShipFromTradeParty

Sub GetShipFromTradeParty(ByRef CompanyName As String, ByRef PostCode As String, ByRef City As String, ByRef Streetline1 As String, Optional ByRef Streetline2 As String = "", Optional ByRef CountryCode_2Letter_ISO As String = "", Optional ByRef CustomerNo As String = "", Optional ByRef VAT_No As String = "", Optional ByRef Leitweg_ID As String = "", Optional ByRef Streetline3 As String = "", Optional ByRef GlobalID As String = "", Optional By)

BG-X-30: Reads the deviating sender (ShipFromTradeParty) of the document. Details →

GetShipToTradeParty

Sub GetShipToTradeParty(ByRef CompanyName As String, ByRef PostCode As String, ByRef City As String, ByRef Streetline1 As String, Optional ByRef Streetline2 As String = "", Optional ByRef CountryCode_2Letter_ISO As String = "", Optional ByRef CustomerNo As String = "", Optional ByRef VAT_No As String = "", Optional ByRef Leitweg_ID As String = "", Optional ByRef Streetline3 As String = "", Optional ByRef GlobalID As String = "", Optional By)

BG-13: Reads the deliver-to party (ShipToTradeParty) of the document. Details →

GetSpecifiedAdvancePayment

Sub GetSpecifiedAdvancePayment(ByVal index As Integer, ByRef PaidAmount As String, Optional ByRef TaxCount As Integer = 0, Optional ByRef ReceivedDate As String = "", Optional ByRef ReceivedDateFormat As String = "102", Optional ByRef InvoiceNumber As String = "", Optional ByRef TypeCode As String = "", Optional ByRef InvoiceDate As String = "", Optional ByRef InvoiceDateFormat As String = "")

Reads an advance payment (SpecifiedAdvancePayment) of the document. Details →

GetSpecifiedAdvancePaymentTax

Sub GetSpecifiedAdvancePaymentTax(ByVal index As Integer, ByVal TaxIndex As Integer, ByRef CalculatedAmount As String, Optional ByRef TypeCode As String = "", Optional ByRef ExemptionReason As String = "", Optional ByRef CategoryCode As String = "", Optional ByRef RateApplicablePercent As String = "")

Reads a tax entry included in an advance payment (SpecifiedAdvancePayment / IncludedTradeTax). Details →

GetSpecifiedProcuringProject

Sub GetSpecifiedProcuringProject(ByRef ProjectID As String, Optional ByRef ProjectName As String = "")

BT-11: Reads the project reference (SpecifiedProcuringProject). Details →

GetStreamAsByteArray

Function GetStreamAsByteArray(ByRef InputStream As System.IO.Stream)

Reads the content of a stream into a byte array. Details →

getTotals

Sub getTotals(ByRef NettoTotal As String, Optional ByRef Total As String = "0.00", Optional ByRef DuePayable As String = "0.00", Optional ByRef TaxableTotal As String = "0.00", Optional ByRef TaxTotal As String = "0.00", Optional ByRef DiscountTotal As String = "0.00", Optional ByRef Prepaid As String = "0.00", Optional ByRef RoundingAmount As String = "0.00", Optional ByRef ChargeTotal As String = "0.00", Optional ByRef Currency )

BG-22: Reads the document totals. Details →

GetTradeAllowanceCharge

Sub GetTradeAllowanceCharge(ByVal Item As Integer, ByRef ChargeIndicator As Boolean, ByRef CalculationPercent As String, ByRef BasisAmount As String, ByRef BasisQuantity As String, ByRef BasisQuantityUnitCode As String, ByRef ActualAmount As String, ByRef Reason As String, ByRef ReasonCode As String, Optional ByRef SequenceNumeric As String = "", Optional ByRef Currency As String = "", Optional ByRef TaxCount As Integer = 0)

Gets Document level allowances / charges BG-20, BG-21 Details →

GetTradeAllowanceChargeTax

Sub GetTradeAllowanceChargeTax(ByVal Item As Integer, ByVal TaxItem As Integer, ByRef TaxRate As String, ByRef CategoryCode As String, ByRef TypeCode As String, ByRef TaxReason As String, ByRef CalculatedAmount As String)

BG-20, BG-21: Reads a VAT entry of a document level allowance / charge. Details →

GetTradeItemAsObject

Function GetTradeItemAsObject(ByVal index As Integer)

Returns the invoice line with the given index as Object (e.g. for late-bound / COM clients). Details →

GetVatTypeByCategoryCode

Function GetVatTypeByCategoryCode(ByVal code As String)

BT-95, BT-102, BT-118, BT-151: Converts a VAT category code (UNCL5305, e.g. S, Z, E, AE, K, G, O, L, M, IC, B) to the VAT_Category enumeration. Details →

GetXSDValidationErrors

Function GetXSDValidationErrors()

Returns the messages of the last ValidateXmlAgainstXsd call, each formatted as "Severity: message" or "Exception: message". Details →

GetZUGFeRD_XMLfromPDF

Function GetZUGFeRD_XMLfromPDF(ByVal InputPDF As String, Optional ByVal Licensekey As String = "", Optional ByRef DataLenght As Integer = 0)

Extracts the embedded ZUGFeRD / Factur-X / XRechnung invoice XML from a PDF file. The attachment named in the PDF/A XMP metadata is preferred; otherwise ZUGFeRD-invoice.xml, factur-x.xml or xrechnung.xml, then any attachment whose name contains zugferd, factur or xrechnung, then any .xml attachment, and finally any attachment containing CrossIndustryInvoice. Details →

GetZUGFeRD_XMLfromPDFStream

Function GetZUGFeRD_XMLfromPDFStream(ByVal InputPDFStream As System.IO.Stream, Optional ByVal Licensekey As String = "")

Extracts the embedded ZUGFeRD / Factur-X / XRechnung invoice XML from a PDF supplied as stream. The stream is written to a temporary file (deleted afterwards) and processed by GetZUGFeRD_XMLfromPDF. Details →

GetZUGFeRD_XMLStreamfromPDFStream

Function GetZUGFeRD_XMLStreamfromPDFStream(ByVal InputPDFStream As System.IO.Stream, Optional ByVal Licensekey As String = "")

Extracts the embedded ZUGFeRD / Factur-X / XRechnung invoice XML from a PDF supplied as stream and returns it as stream. The stream is written to a temporary file (deleted afterwards) and processed by GetZUGFeRD_XMLfromPDF. Details →

GlobalID2String

Function GlobalID2String(ByVal c As iXML.GlobalIDSchemas)

Converts a GlobalIDSchemas enum value into its ISO 6523 scheme code string (e.g. GLN to 0088). Details →

GlobalIDFromString

Function GlobalIDFromString(ByVal s As String)

Converts an ISO 6523 scheme code (e.g. 0088) into the GlobalIDSchemas enum (global identifier scheme, e.g. BT-29-1, BT-157-1). Details →

I

ImportCSV

Function ImportCSV(Optional ByRef SellerPath As String = "", Optional ByRef BuyerPath As String = "", Optional ByRef ItemsPath As String = "", Optional ByRef TotalsPath As String = "", Optional ByRef AllowancesPath As String = "", Optional ByVal SeperatorChar As String = ",", Optional ByVal ImportCharacterSet As String = "", Optional ByVal deliverto As String = "", Optional ByVal deliverfrom As String = "")

Creates a new invoice from CSV data (seller, buyer, line items, totals, allowances/charges and optional ship-to / ship-from parties), e.g. as produced by CreateCSV. The invoice is created as XRechnung/EN 16931 (xInvoice); missing currency defaults to EUR, missing or "today" invoice date to the current date, missing type to 380. Details →

Invoice_TradeItem

Property Invoice_TradeItem

InvoicePaymentMeansBankName

Property InvoicePaymentMeansBankName

InvoicePaymentMeansBIC

Property InvoicePaymentMeansBIC

InvoiceReferencedDocuments

Function InvoiceReferencedDocuments()

BG-3: Returns the number of preceding invoice references (InvoiceReferencedDocument) in the current invoice. Details →

is_Licensed

Function is_Licensed(ByVal LicenseKey As String)

Checks whether this instance is licensed. If it is not yet licensed, the given key is checked for a valid ZUGFeRD, ZUGFeRD SDK or PDF viewer licence and, if valid, activated for this instance. Details →

ItemWriteBillingPeriod

Sub ItemWriteBillingPeriod(ByVal ItemNo As Integer, ByVal StartDateTime As String, ByVal EndDateTime As String, Optional ByVal DateFormat As String = "102")

BG-26: Sets the invoicing period of an invoice line (BT-134 start date, BT-135 end date). Details →

K

Kundennummer

Property Kundennummer
L

LastWarning

Warnings collected while building the invoice (empty if there are none). A warning does not stop SaveXML. Example: with isKOSIT = True a call that sets an EXTENDED-only field switches the invoice to Factur-X EXTENDED - it is then no XRechnung. Details →

LoadPDF2Mem

Function LoadPDF2Mem(ByVal PDFFilePath As String, Optional ByVal OwnwerPass As String = "", Optional ByVal LicenseKey As String = "")

Selects a PDF file for subsequent attachment access (AttachmentCount, AttachmentBytes, AttachmentName, SaveAttachment). Previously loaded data is released first (CloseAll). Details →

LoadXML

Function LoadXML(ByVal XMLPath As String, Optional ByVal LicenseKey As String = "")

Loads an XML file into an XmlDocument. If the file cannot be parsed, it is retried with German umlauts and ß replaced by ASCII. Does not fill the invoice data of this object (see FillZUGFeRD_Structure). Details →

LogisticsServiceChargesCount

Function LogisticsServiceChargesCount()

Returns the number of logistics service charges in the document. Details →

M

MergeXMLIntoPDF

Function MergeXMLIntoPDF(ByVal XMLPath As String, ByVal PDFInputPath As String, ByVal PDFOutputPath As String, Optional ByVal DoOverWrite As Boolean = False, Optional ByVal AdditionalFile As String = "", Optional ByVal LicenseKey As String = "", Optional ByVal Author As String = "", Optional ByVal Title As String = "", Optional ByVal Subject As String = "", Optional ByVal Keywords As String = "")

Embeds a ZUGFeRD / Factur-X / XRechnung XML file into a PDF and saves it as PDF/A-3 hybrid invoice. Profile and version are taken from the XML; author, title and keywords are filled from the XML where not given. Details →

MergeXMLIntoPDFWait4PDF

Function MergeXMLIntoPDFWait4PDF(ByVal XMLPath As String, ByVal PDFInputPath As String, ByVal PDFOutputPath As String, Optional ByVal DoOverWrite As Boolean = False, Optional ByVal waitTimeInMilliseconds As Integer = 0, Optional ByVal AdditionalFile As String = "", Optional ByVal LicenseKey As String = "", Optional ByVal Author As String = "", Optional ByVal Title As String = "", Optional ByVal Subject As String = "", Optional ByVal Keywords As Stri)

Like MergeXMLIntoPDF, but first waits until the input PDF exists, is readable and is not locked (e.g. while another process is still writing it). Details →

MergeXMLIntoTargetPDF

Function MergeXMLIntoTargetPDF(ByVal XMLPath As String, ByVal PDFInputPath As String, ByVal PDFOutputPath As String, Optional ByVal DoOverWrite As Boolean = False, Optional ByVal AdditionalFile As String = "", Optional ByVal LicenseKey As String = "", Optional ByVal Author As String = "", Optional ByVal Title As String = "", Optional ByVal Subject As String = "", Optional ByVal Keywords As String = "")

Same as MergeXMLIntoPDF, but exceptions are caught and their message is stored in Last_Error. Embeds a ZUGFeRD / Factur-X / XRechnung XML file into a PDF and saves it as PDF/A-3 hybrid invoice. Profile and version are taken from the XML; author, title and keywords are filled from the XML where not given. Details →

MergeXMLStreamIntoPDFStream

Function MergeXMLStreamIntoPDFStream(ByVal XMLData As System.IO.Stream, ByVal PDFInputStream As System.IO.Stream, ByRef PDFOutputStream As System.IO.Stream, Optional ByVal AdditionalFile As String = "", Optional ByVal LicenseKey As String = "", Optional ByVal Author As String = "", Optional ByVal Title As String = "", Optional ByVal Subject As String = "", Optional ByVal Keywords As String = "")

Embeds a ZUGFeRD / Factur-X / XRechnung XML into a PDF, both supplied as streams, and returns the resulting PDF/A-3 as stream. Uses temporary files (deleted afterwards) and MergeXMLIntoPDF. Details →

MyHandler

Handler for AppDomain.UnhandledException registered by the constructors. Clears the VB error object; it does not log or rethrow. Details →

O

OrderNumber

Property OrderNumber
P

PaymentTermsCount

Function PaymentTermsCount()

Returns the number of payment terms (SpecifiedTradePaymentTerms) in the document. Details →

PDFAMetaProperties

Function PDFAMetaProperties(ByVal InputPDF As String, ByRef ZUGFeRD_Version As String, ByRef ZUGFeRD_Level As String, ByRef ZUGFeRD_FileName As String, Optional ByVal Licensekey As String = "", Optional ByRef ZUGFeRD_DocumentType As String = "", Optional ByRef XMLMetaDataSTR As String = "")

Reads the ZUGFeRD / Factur-X XMP extension properties (DocumentFileName, ConformanceLevel, DocumentType, Version) from the metadata of a PDF. Details →

PDFTextCheckReport

Report of the last CheckPDFTextAgainstXML call as text: a headline (MATCH, WARNING, MISMATCH or NOT CHECKABLE) and one line per compared value (OK, MISSING, WARNING or NOTE with the field, the value of the XML and how it is printed on the PDF). "" before the first check. Details →

PrintPDFDocument

Function PrintPDFDocument(ByVal FileName As String, ByVal LicenseKey As String, Optional ByRef PrinterName As String = "", Optional ByVal AutoRotate As Boolean = True, Optional ByVal AutoScaling As Boolean = True, Optional ByRef PrintTitle As String = "", Optional ByVal Password As String = "", Optional ByVal StartPage As Integer = -1, Optional ByVal EndPage As Integer = -1)

Prints a PDF document. Details →

R

Read_ReferencedDocument

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 = "")

Reads a referenced document (buyer order, quotation, contract or ultimate customer order) of a line item. Details →

ReadAdditionalReferencedDocument

Sub ReadAdditionalReferencedDocument(ByVal Index As Integer, ByRef IssuerAssignedID As String, ByRef URIID As String, Optional ByRef TypeCode As String = "", Optional ByRef Name As String = "", Optional ByRef MimeCode As String = "", Optional ByRef FileName As String = "", Optional ByRef IssueDateTime As String = "", Optional ByRef Document_DateFormat As String = "", Optional ByRef ReferenceTypeCode As String = "", Optional ByRef MimeType As String = "")

BG-24: Reads a document-level additional referenced document by index. Details →

ReadAllBytes

Function ReadAllBytes(ByVal path As String)

Reads the complete content of a file into a byte array. Details →

ReadBuyerLegalID

Sub ReadBuyerLegalID(ByRef LegalID As String, Optional ByRef Schema As String = "")

BT-47: Reads the buyer legal registration identifier. Details →

ReadSellerLegalID

Sub ReadSellerLegalID(ByRef LegalID As String, Optional ByRef Schema As String = "")

BT-30: Reads the seller legal registration identifier. Details →

ReadTotalsCSV

Function ReadTotalsCSV(Optional ByVal Seperator_Char As String = ",")

Exports the invoice header data and document totals of the current invoice as CSV text (one header row and one data row). Columns include currency, type, leitwegid, invoiceid, invoicedate, the BG-22 totals (LineTotalAmount ... DuePayableAmount), payment terms, PaymentReference, invoice notes, delivery and billing period dates, LanguageID, BusinessProcessSpecifiedDocumentContextParameter, VAT breakdown (TAX* columns per rate), preceding invoice reference, project, contract and order references. Details →

ReadTradeAllowanceChargesCSV

Function ReadTradeAllowanceChargesCSV(Optional ByVal Seperator_Char As String = ",")

Exports the document level allowances and charges (BG-20, BG-21) of the current invoice as CSV text: one header row plus one row per allowance/charge. Columns: chargeindicator (1 = charge, 0 = allowance), basisamount, calculationpercent, actualamount, reason, taxpercent, taxtypecode, taxcategorycode, reasoncode, currency, exemptionreason, exemptionreasoncode. Details →

ReadTradeItemCSV

Function ReadTradeItemCSV(Optional ByVal Seperator_Char As String = ",")

Exports all invoice lines of the current invoice as CSV text: one header row plus one row per line item. Columns include seller/buyer/global item IDs, name, description, note, LineID, quantity and unit, net/gross price, line total, VAT rate/category/type/exemption reason, the first gross price allowance, delivery note and order/contract/quotation references of the line. Details →

remove_URIUniversalCommunication

Sub remove_URIUniversalCommunication()

BT-34: Clears the electronic address and its scheme of the seller. Details →

removeTradePaymentTerms

Sub removeTradePaymentTerms()

Removes all payment terms (SpecifiedTradePaymentTerms) from the document. Details →

ReplaceUmlautsWithAscii

Converts a string to ASCII-like text by removing diacritical marks (Unicode normalization) and replacing ß with ss. Details →

S

Save_XMLDoc

Function Save_XMLDoc(ByVal XMLPath As String, ByVal LicenseKey As String)

Saves the current invoice data as XML file. Calls SaveXML with path and licence key only, so SaveXML's default standard xInvoice (XRechnung) is applied. Details →

SaveAsXeroCSV

Function SaveAsXeroCSV(ByVal OutputCSV As String, Optional ByVal DoOverwrite As Boolean = False)

Exports the loaded invoice as a Xero sales invoice import CSV file (one row per line item, UTF-8 with BOM). Contains buyer contact and address, invoice number, reference, invoice date, due date, total, item code, description, quantity, unit price, tax type, tax amount and currency. Details →

SaveAttachment

Function SaveAttachment(ByVal TargetPath As String, ByVal Index As Integer, Optional ByVal DoOverWrite As Boolean = False)

Saves an attachment of the PDF loaded with LoadPDF2Mem to a file. AttachmentCount must have been read before so that the attachments are loaded. Details →

SaveXML

Function SaveXML(ByVal XMLPath As String, Optional ByVal DoOverwrite As Boolean = False, Optional ByRef LastError As String = "")

Generates the invoice XML (CII CrossIndustryInvoice, or CrossIndustryDocument for ZUGFeRD 1) from the current invoice data and saves it to a file. An existing file at XMLPath is overwritten. On success the XML text is also available in LastSavedXML. Details →

SealAndFlatten

Function SealAndFlatten(ByVal OutputPDF As String, Optional ByVal OverWriteTarget As Boolean = False, Optional ByVal InputPDF As String = "", Optional ByVal LicenseKey As String = "")

SellerTradingBusinessName

Property SellerTradingBusinessName

Set_Actual_DeliveryDate

Sub Set_Actual_DeliveryDate(ByVal DeliveryDate As String, Optional ByVal DeliveryDateFormat As String = "102")

BT-72: Sets the actual delivery date (ActualDeliverySupplyChainEvent) on document level. Details →

SetActualDeliveryDate

Sub SetActualDeliveryDate(ByVal OccurrenceDateTime As String, Optional ByVal Format As String = "102")

BT-72: Sets the actual delivery date (ram:ActualDeliverySupplyChainEvent/ram:OccurrenceDateTime). Details →

setActualDeliveryDateItem

Sub setActualDeliveryDateItem(ByVal Position As Integer, ByVal DeliveryDateTimeString As String, Optional ByVal DeliveryDateFormat As String = "102")

BT-X-85: Sets the actual delivery date of a line item (item level ActualDeliverySupplyChainEvent). Details →

SetCompleteDate

Sub SetCompleteDate(ByVal CompleteDateTime As String, Optional ByVal Format As String = "102")

Sets the complete date of the document (ram:CompleteDateTime in the exchanged document header). Details →

SetIncludedNote

Sub SetIncludedNote(ByVal Content As String, Optional ByVal SubjectCode As String = "", Optional ByVal ContentCode As String = "")

BG-1: Sets the invoice note on document level. All existing document notes are replaced by this single note. Details →

SetLogisticsServiceChargeExemption

EXTENDED: sets the VAT exemption reason of a logistics service charge that was added with AddLogisticsServiceCharge. Written as ram:AppliedTradeTax/ram:ExemptionReason and ram:ExemptionReasonCode. Use exactly the same text and code as in the matching VAT breakdown (AddTradeTax, BT-120 / BT-121): the Factur-X EXTENDED rules BR-FXEXT-..-08rev only count charges whose exemption reason is identical to the VAT breakdown. Details →

SetPayeeTradeParty

Sub SetPayeeTradeParty(ByVal ID As String, ByVal GlobalID As String, ByVal GlobalIDScheme As String, ByVal CompanyName As String, ByVal RoleCode As String, ByVal VAT As String, ByVal PersonName As String, ByVal DepartmentName As String, ByVal PhoneNumber As String, ByVal FAXNumber As String, ByVal email As String, ByVal Street1 As String, ByVal Street2 As String, ByVal Street3 As String, ByVal PostCode As String, ByVal City As String, ByVa)

BG-10: Sets the payee (PayeeTradeParty) of the invoice. Nothing values are treated as empty strings. Details →

SetReceivingAdviceReferencedDocument

Sub SetReceivingAdviceReferencedDocument(ByVal IssuerAssignedID As String, Optional ByVal FormattedIssueDateTime As String = "", Optional ByVal Format As String = "")

BT-15: Sets the receiving advice reference (ram:ReceivingAdviceReferencedDocument). Details →

SetTradeAllowanceChargeExemption

EXTENDED: sets the VAT exemption reason of a document level allowance or charge (BG-20 / BG-21) that was added with AddTradeAllowanceCharge. Written as ram:CategoryTradeTax/ram:ExemptionReason and ram:ExemptionReasonCode. Use exactly the same text and code as in the matching VAT breakdown (AddTradeTax, BT-120 / BT-121): the Factur-X EXTENDED rules BR-FXEXT-..-08rev only count allowances/charges whose exemption reason is identical to the VAT breakdown. A non-empty reason or code switches the profile to Factur-X EXTENDED (EN 16931 and XRechnung have no exemption reason on allowances/charges); for an EN 16931 invoice or an XRechnung do not call this function. Details →

setZUGFeRD_StructureOBJ

Sub setZUGFeRD_StructureOBJ(ByRef ZugferdObj As Object)

Replaces the complete internal invoice data structure with the given object. Details →

SignPDFRemote

Signs a PDF remotely with the CodeB Remote Signature Service (CSC v2, endpoint signatures/signDocBasic): the PDF is sent via HTTPS, the service returns it with a PAdES signature (incremental update, existing content and attachments such as the ZUGFeRD XML stay unchanged). Details →

SignPDFRemoteBytes

Same as SignPDFRemote, but works on bytes (e.g. for web services): returns the signed PDF, or Nothing on error (reason in Last_Error). Details →

SpecifiedAdvancePaymentCount

Function SpecifiedAdvancePaymentCount()

Returns the number of advance payments (SpecifiedAdvancePayment) in the document. Details →

SpecifiedExchangedDocumentContext

Field SpecifiedExchangedDocumentContext

SupplyChain_Structure

Property SupplyChain_Structure
T

TaxExemptionReasonCodeStr

Function TaxExemptionReasonCodeStr(ByVal WhichCode As iXML.TaxExemptionReasonCodes)

BT-121: Converts a TaxExemptionReasonCodes enum value into the official VATEX code (CEF VATEX list, e.g. VATEX_EU_AE becomes VATEX-EU-AE, VATEX_132_2 becomes VATEX-EU-132). Details →

TestIndicator

Field TestIndicator

Trade_ItemAllowance

Property Trade_ItemAllowance

BG-27/28: INVOICE LINE ALLOWANCES / CHARGES Details →

Trade_Items

Property Trade_Items

Trade_ItemTradeDelivery

Property Trade_ItemTradeDelivery

BT-129-0: Grouping of delivery details on line level Details →

Trade_ItemTradeNotes

Property Trade_ItemTradeNotes

BT-127-00 LineItem IncludedNotes BT-127, BT-X-9, BT-X-10 Details →

Trade_ItemTradeSellerAssignedID

Property Trade_ItemTradeSellerAssignedID

BT-155: Line Item Sellers's identifier Details →

TradeAllowanceCharge

Field TradeAllowanceCharge

TradeAllowanceCharges

Property TradeAllowanceCharges

TradeItemNoteLine

Property TradeItemNoteLine

TradeItemNotesCount

Property TradeItemNotesCount

TradeItemTaxValues

Sub TradeItemTaxValues(ByVal ItemNo As Integer, ByRef ApplicablePercent As String, ByRef CalculatedAmount As String, ByRef TypeCode As String, ByRef CategoryCode As String, ByRef Reason As String)

BG-30: Reads the VAT values of an invoice line. Details →

TradePaymentTerm

Sub TradePaymentTerm(ByVal Index As Integer, ByRef Description As String, Optional ByRef ActualDiscountAmount As String = "", Optional ByRef CalculationPercent As String = "", Optional ByRef DirectDebitMandateID As String = "", Optional ByRef BasisDateTime As String = "", Optional ByRef BasisPeriod As String = "", Optional ByRef DueDate As String = "", Optional ByVal DiscountBasisAmount As String = "")

BT-20: Reads the payment term with the given index, including due date, mandate reference and payment discount terms. Details →

TradeTaxItem

Property TradeTaxItem
U

unitCode

Field unitCode

UnloadEverything

Sub UnloadEverything()

Releases resources held by this object: sets the GC latency mode to Interactive, restores the original locale, removes the unhandled exception handler, unloads and releases the internal PDF object, clears collected PDF file attachments and forces a garbage collection. Call when the object is no longer needed. Details →

V

ValidateInvoicePDF

Function ValidateInvoicePDF(ByVal PDFPath As String, Optional ByVal LicenseKey As String = "")

BETA. Extracts the invoice XML embedded in a ZUGFeRD / Factur-X / XRechnung PDF and checks it like ValidateInvoiceXML; also checks the XMP metadata (PDF/A-3, Factur-X / ZUGFeRD properties, profile and file name) and the attachment of the invoice (AFRelationship, /AF, MIME type text/xml). The PDF/A conformance itself is not checked. Details →

ValidateInvoiceXML

Function ValidateInvoiceXML(ByVal XMLPath As String, Optional ByVal LicenseKey As String = "")

BETA. Checks an invoice XML file: CII (ZUGFeRD / Factur-X MINIMUM, BASIC WL, BASIC, EN 16931, EXTENDED, XRechnung 3.0) or UBL 2.1 Invoice / CreditNote (EN 16931, XRechnung 3.0) with the published rules (EN 16931, XRechnung, Factur-X 1.09.2) and the XML schema. ZUGFeRD 1.0 and XRechnung before 3.0 are reported as invalid. Returns True when the invoice is accepted (no error). Details: Validation* members. Details →

ValidateInvoiceXMLString

Function ValidateInvoiceXMLString(ByVal XMLText As String, Optional ByVal LicenseKey As String = "")

BETA. Checks invoice XML given as text (e.g. from a database) like ValidateInvoiceXML. Details →

ValidateXmlAgainstXsd

Function ValidateXmlAgainstXsd(ByVal xmlPath As String, ByVal xsdPath As String, Optional ByVal schemaNamespace As String = Nothing)

Validates an XML file against an XSD schema. The messages can be read with GetXSDValidationErrors. Details →

ValidationErrorCount

Property ValidationErrorCount

Number of errors of the last check (after the scenario's levels). Any error means: not accepted. Details →

ValidationLanguage

Property ValidationLanguage

Language of ValidationMessageText and ValidationReport: "de" (default) or "en". The official rule texts are not translated. Details →

ValidationMessageCount

Property ValidationMessageCount

Number of messages (errors, warnings, information) of the last check. Use with ValidationMessageID etc. (index 0 .. count - 1). Details →

ValidationMessageID

Function ValidationMessageID(ByVal Index As Integer)

Rule id of message Index (zero-based), e.g. "BR-CO-10", "BR-DE-18"; "XSD" for XML schema errors; "" if out of range. Details →

ValidationMessageLevel

Function ValidationMessageLevel(ByVal Index As Integer)

Level of message Index (zero-based): "error", "warning" or "information" (as used for the acceptance decision). Details →

ValidationMessageLocation

Function ValidationMessageLocation(ByVal Index As Integer)

Position of message Index (zero-based) in the XML as path, e.g. /rsm:CrossIndustryInvoice[1]/rsm:SupplyChainTradeTransaction[1]; for XML schema errors the line number. Details →

ValidationMessageRuleText

Function ValidationMessageRuleText(ByVal Index As Integer)

Official text of the rule of message Index (zero-based), as published (EN 16931 rules in English, XRechnung rules in German). Details →

ValidationMessageText

Function ValidationMessageText(ByVal Index As Integer)

Readable explanation of message Index (zero-based) in ValidationLanguage: what is wrong, the affected fields (BT/BG with name), the value found and the SDK members for these fields. The official rule text: ValidationMessageRuleText. Details →

ValidationRulesVersion

Property ValidationRulesVersion

Versions of the rule sets used by ValidateInvoiceXML / ValidateInvoicePDF / ValidateInvoiceXMLString. Details →

ValidationScenario

Property ValidationScenario

Scenario of the last check: "xrechnung", "xrechnung-extension", "xrechnung-cvd", "en16931", "minimum", "basicwl", "basic", "extended", "ubl-xrechnung", "ubl-xrechnung-extension", "ubl-xrechnung-cvd", "ubl-en16931", "none" (not validated) or "". Details →

ValidationWarningCount

Property ValidationWarningCount

Number of warnings of the last check. Warnings do not stop acceptance. Details →

W

WaitForFile

Function WaitForFile(ByVal filePath As String, ByVal waitTimeInMilliseconds As Integer)

Waits until a file exists, can be opened for reading and is not locked by another process. Checks every 100 ms. Details →

WriteAllBytes

Function WriteAllBytes(ByVal path As String, ByVal bytes() As Byte)

Writes a byte array to a file; an existing file is overwritten. Details →

WriteBuyer

Sub WriteBuyer(ByVal CompanyName As String, ByVal PostCode As String, ByVal City As String, ByVal Streetline1 As String, Optional ByVal Streetline2 As String = "", Optional ByVal CountryCode_2Letter_ISO As String = "", Optional ByVal CustomerNo As String = "", Optional ByVal VAT_No As String = "", Optional ByVal Leitweg_ID As String = "", Optional ByVal Streetline3 As String = "")

BG-7: Sets the buyer name, postal address (BG-8), identifier and VAT identifier. Details →

WriteInvoiceeTradeParty

Sub WriteInvoiceeTradeParty(ByVal CompanyName As String, ByVal PostCode As String, ByVal City As String, ByVal Streetline1 As String, Optional ByVal Streetline2 As String = "", Optional ByVal CountryCode_2Letter_ISO As String = "", Optional ByVal CustomerNo As String = "", Optional ByVal VAT_No As String = "", Optional ByVal Leitweg_ID As String = "", Optional ByVal Streetline3 As String = "")

Sets the invoicee party (InvoiceeTradeParty), i.e. a party receiving the invoice that differs from the buyer. Details →

WriteItemTradeTax

Sub WriteItemTradeTax(ByVal ItemIndex As Integer, ByVal RateApplicablePercent As String, ByVal CategoryCode As String, Optional ByVal Reason As String = "", Optional ByVal ExemptionReasonCode As String = "", Optional ByVal CalculatedAmount As String = "", Optional ByVal TypeCode As String = "VAT")

BG-30: Sets the VAT information of an invoice line (replaces any existing line VAT data). Details →

WriteLineItemOriginTradeCountry

Sub WriteLineItemOriginTradeCountry(ByVal Index As Integer, ByVal ID As String)

BT-159: Sets the country of origin of the item of an invoice line. Details →

WriteShipFromTradeParty

Sub WriteShipFromTradeParty(ByVal CompanyName As String, ByVal PostCode As String, ByVal City As String, ByVal Streetline1 As String, Optional ByVal Streetline2 As String = "", Optional ByVal CountryCode_2Letter_ISO As String = "", Optional ByVal CustomerNo As String = "", Optional ByVal VAT_No As String = "", Optional ByVal Leitweg_ID As String = "", Optional ByVal Streetline3 As String = "", Optional ByVal GlobalID As String = "", Optional By)

BG-X-30: Sets the deviating sender (ShipFromTradeParty) of the document. Details →

WriteShipToTradeParty

Sub WriteShipToTradeParty(ByVal CompanyName As String, ByVal PostCode As String, ByVal City As String, ByVal Streetline1 As String, Optional ByVal Streetline2 As String = "", Optional ByVal CountryCode_2Letter_ISO As String = "", Optional ByVal LocationID As String = "", Optional ByVal VAT_No As String = "", Optional ByVal Leitweg_ID As String = "", Optional ByVal Streetline3 As String = "", Optional ByVal GlobalID As String = "", Optional By)

BG-13: Sets the deliver-to party (ShipToTradeParty) of the document. Details →

WriteShipToTradePartyItem

Sub WriteShipToTradePartyItem(ByVal ItemID As String, ByVal CompanyName As String, ByVal PostCode As String, ByVal City As String, ByVal Streetline1 As String, Optional ByVal Streetline2 As String = "", Optional ByVal CountryCode_2Letter_ISO As String = "", Optional ByVal CustomerNo As String = "", Optional ByVal VAT_No As String = "", Optional ByVal Leitweg_ID As String = "", Optional ByVal Streetline3 As String = "", Optional ByVal GlobalID As )

Sets a deliver-to party (ShipToTradeParty) on an invoice line. Details →

WriteTotals

Sub WriteTotals(ByVal NettoTotal As String, ByVal Total As String, ByVal DuePayable As String, Optional ByVal TaxableTotal As String = "0.00", Optional ByVal TaxTotal As String = "0.00", Optional ByVal DiscountTotal As String = "0.00", Optional ByVal Prepaid As String = "0.00", Optional ByVal RoundingAmount As String = "0.00", Optional ByVal ChargeTotal As String = "0.00")

BG-22: Writes the document totals from string values. Details →

Z

ZUGFeRD_TestIndikator

Property ZUGFeRD_TestIndikator