CreateNewInvoice

Methode (Function) · gibt Boolean zurück

CreateNewInvoice ist eine Methode der Klasse Aloaha_ZUGFeRD.XML im Aloaha ZUGFeRD SDK. Sie betrifft BT-1 (Rechnungsnummer), BT-83 (Verwendungszweck), BT-22 (Freitext zur Rechnung), BG-1 (Freitext zur Rechnung).

Beschreibung (Originaltext der englischen SDK-Dokumentation): Starts a new invoice like CreateInvoice and reports success as Boolean. The invoice data currently held by this object is replaced.

Rückgabe: True if the new invoice was created (invoice date is set), otherwise False.

Deklaration

Public 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 = "") As Boolean

Parameter

NameTypPflichtBeschreibung
InvoiceIDStringerforderlichBT-1: Invoice number. Also used as payment reference (BT-83).
InvoiceNoteStringoptional (Standard: "")BT-22 (BG-1): Optional invoice note. Ignored if empty.
InvoiceDateStringoptional (Standard: "")BT-2: Invoice date, e.g. YYYYMMDD. If empty, today's date is used with format 102.
InvoiceDateFormatStringoptional (Standard: "")Date format code of InvoiceDate, 102 for YYYYMMDD.
InvoiceName_FreeTextStringoptional (Standard: "")Document name (free text). Should normally remain empty.
InvoiceLanguageID_2Letter_ISOStringoptional (Standard: "")Document language as 2-letter ISO code, e.g. DE for German.
CurrencyIDStringoptional (Standard: "")BT-5: Invoice currency code, e.g. EUR. Spaces are removed and the code is upper-cased.

Aufruf (VB.NET)

Dim alo As New Aloaha_ZUGFeRD.XML(Aloaha_ZUGFeRD.iXML.ZUGFeRDProfile.comfort, False, "IHR-LIZENZSCHLUESSEL")
Dim InvoiceID As String = ""
If Not alo.CreateNewInvoice(InvoiceID) Then
    Console.WriteLine("Fehler: " & alo.Last_Error)
End If

Aufruf (C#)

var alo = new Aloaha_ZUGFeRD.XML(Aloaha_ZUGFeRD.iXML.ZUGFeRDProfile.comfort, false, "IHR-LIZENZSCHLUESSEL");
string invoiceID = "";
if (!alo.CreateNewInvoice(invoiceID))
{
    Console.WriteLine("Fehler: " + alo.Last_Error);
}

Business Terms (EN 16931)

Artikel mit CreateNewInvoice

COM-Schnittstelle

CreateNewInvoice ist Mitglied der Schnittstelle Aloaha_ZUGFeRD.iXML (Position 85 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.